Skip to content

Commit

Permalink
Fix up generated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jul 7, 2024
1 parent 07fc542 commit 29234ce
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/framework/tests/Unit/CustomExceptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,14 @@ public function testInvalidConfigurationExceptionWithCustomMessage()

public function testInvalidConfigurationExceptionWithNamespaceAndKey()
{
$exception = new InvalidConfigurationException('Invalid configuration.', 'app', 'debug');
$exception = new InvalidConfigurationException('Invalid configuration.', 'hyde', 'name');

$this->assertSame('Invalid configuration.', $exception->getMessage());
$this->assertFileExists($exception->file);
$this->assertIsInt($exception->line);
$this->assertFileExists($exception->getFile());
$this->assertIsInt($exception->getLine());

$this->assertStringContainsString('config'.DIRECTORY_SEPARATOR.'hyde.php', $exception->getFile());
$this->assertGreaterThan(0, $exception->getLine());
}

public function testInvalidConfigurationExceptionWithNonExistentNamespace()
Expand All @@ -213,7 +216,7 @@ public function testInvalidConfigurationExceptionWithNonExistentKey()

public function testInvalidConfigurationExceptionFindConfigLine()
{
$exception = new class('Invalid configuration.', 'app', 'debug') extends InvalidConfigurationException {
$exception = new class('Invalid configuration.', 'hyde', 'name') extends InvalidConfigurationException {
public function exposedFindConfigLine(string $namespace, string $key): array
{
return $this->findConfigLine($namespace, $key);
Expand Down

0 comments on commit 29234ce

Please sign in to comment.