Skip to content

Commit

Permalink
Remove unnecessary tests
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jul 7, 2024
1 parent 29234ce commit 3083c7f
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions packages/framework/tests/Unit/CustomExceptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,32 +201,4 @@ public function testInvalidConfigurationExceptionWithNamespaceAndKey()
$this->assertStringContainsString('config'.DIRECTORY_SEPARATOR.'hyde.php', $exception->getFile());
$this->assertGreaterThan(0, $exception->getLine());
}

public function testInvalidConfigurationExceptionWithNonExistentNamespace()
{
$this->expectException(\AssertionError::class);
new InvalidConfigurationException('Invalid configuration.', 'non_existent', 'key');
}

public function testInvalidConfigurationExceptionWithNonExistentKey()
{
$this->expectException(\AssertionError::class);
new InvalidConfigurationException('Invalid configuration.', 'app', 'non_existent_key');
}

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

[$file, $line] = $exception->exposedFindConfigLine('app', 'debug');

$this->assertFileExists($file);
$this->assertIsInt($line);
$this->assertGreaterThan(0, $line);
}
}

0 comments on commit 3083c7f

Please sign in to comment.