Skip to content

Commit 9fff2de

Browse files
Add tests
1 parent 0e013b0 commit 9fff2de

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,6 +1467,26 @@ public function testDoNotFailOnPhpunitDeprecationMayNotBeConfigured(): void
14671467
$configuration->doNotFailOnPhpunitDeprecation();
14681468
}
14691469

1470+
#[TestDox('--do-not-fail-on-phpunit-warning')]
1471+
public function testDoNotFailOnPhpunitWarning(): void
1472+
{
1473+
$configuration = (new Builder)->fromParameters(['--do-not-fail-on-phpunit-warning']);
1474+
1475+
$this->assertTrue($configuration->hasDoNotFailOnPhpunitWarning());
1476+
$this->assertTrue($configuration->doNotFailOnPhpunitWarning());
1477+
}
1478+
1479+
public function testDoNotFailOnPhpunitWarningMayNotBeConfigured(): void
1480+
{
1481+
$configuration = (new Builder)->fromParameters([]);
1482+
1483+
$this->assertFalse($configuration->hasDoNotFailOnPhpunitWarning());
1484+
1485+
$this->expectException(Exception::class);
1486+
1487+
$configuration->doNotFailOnPhpunitWarning();
1488+
}
1489+
14701490
#[TestDox('--do-not-fail-on-empty-test-suite')]
14711491
public function testDoNotFailOnEmptyTestSuite(): void
14721492
{

0 commit comments

Comments
 (0)