mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-23 22:24:18 +02:00
Added InvalidConfigurationTest
This commit is contained in:
21
tests/Exceptions/InvalidConfigurationTest.php
Normal file
21
tests/Exceptions/InvalidConfigurationTest.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Exceptions;
|
||||
|
||||
use App\Exceptions\InvalidConfiguration;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\Exceptions\InvalidConfiguration */
|
||||
class InvalidConfigurationTest extends TestCase
|
||||
{
|
||||
public function test_it_can_be_instantiated_from_a_config_value(): void
|
||||
{
|
||||
$exception = InvalidConfiguration::fromConfig('bar', 'foo');
|
||||
|
||||
$this->assertInstanceOf(InvalidConfiguration::class, $exception);
|
||||
$this->assertEquals(
|
||||
"Unknown value 'foo' for configuration option 'bar'",
|
||||
$exception->getMessage()
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user