Skip to content

Commit b386e00

Browse files
Add tests
1 parent d4030ef commit b386e00

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

tests/unit/TextUI/Configuration/Cli/BuilderTest.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,26 @@ public function testFilterMayNotBeConfigured(): void
491491
$configuration->filter();
492492
}
493493

494+
#[TestDox('--exclude-filter string')]
495+
public function testExcludeFilter(): void
496+
{
497+
$configuration = (new Builder)->fromParameters(['--exclude-filter', 'string']);
498+
499+
$this->assertTrue($configuration->hasExcludeFilter());
500+
$this->assertSame('string', $configuration->excludeFilter());
501+
}
502+
503+
public function testExcludeFilterMayNotBeConfigured(): void
504+
{
505+
$configuration = (new Builder)->fromParameters([]);
506+
507+
$this->assertFalse($configuration->hasExcludeFilter());
508+
509+
$this->expectException(Exception::class);
510+
511+
$configuration->excludeFilter();
512+
}
513+
494514
#[TestDox('--testsuite string')]
495515
public function testTestSuite(): void
496516
{
@@ -776,6 +796,14 @@ public function testListSuites(): void
776796
$this->assertTrue($configuration->listSuites());
777797
}
778798

799+
#[TestDox('--list-test-files')]
800+
public function testListTestFiles(): void
801+
{
802+
$configuration = (new Builder)->fromParameters(['--list-test-files']);
803+
804+
$this->assertTrue($configuration->listTestFiles());
805+
}
806+
779807
#[TestDox('--list-tests')]
780808
public function testListTests(): void
781809
{

0 commit comments

Comments
 (0)