Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Jul 18, 2024
1 parent d4030ef commit b386e00
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/unit/TextUI/Configuration/Cli/BuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,26 @@ public function testFilterMayNotBeConfigured(): void
$configuration->filter();
}

#[TestDox('--exclude-filter string')]
public function testExcludeFilter(): void
{
$configuration = (new Builder)->fromParameters(['--exclude-filter', 'string']);

$this->assertTrue($configuration->hasExcludeFilter());
$this->assertSame('string', $configuration->excludeFilter());
}

public function testExcludeFilterMayNotBeConfigured(): void
{
$configuration = (new Builder)->fromParameters([]);

$this->assertFalse($configuration->hasExcludeFilter());

$this->expectException(Exception::class);

$configuration->excludeFilter();
}

#[TestDox('--testsuite string')]
public function testTestSuite(): void
{
Expand Down Expand Up @@ -776,6 +796,14 @@ public function testListSuites(): void
$this->assertTrue($configuration->listSuites());
}

#[TestDox('--list-test-files')]
public function testListTestFiles(): void
{
$configuration = (new Builder)->fromParameters(['--list-test-files']);

$this->assertTrue($configuration->listTestFiles());
}

#[TestDox('--list-tests')]
public function testListTests(): void
{
Expand Down

0 comments on commit b386e00

Please sign in to comment.