Skip to content

Commit b012ab9

Browse files
Merge pull request #30 from sstok/fix-strict
fix AbstractCompilerPassTestCase when using strict-mode
2 parents 86f4f67 + a4eac1d commit b012ab9

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

PhpUnit/AbstractCompilerPassTestCase.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ public function compilation_should_not_fail_with_empty_container()
2323
{
2424
try {
2525
$this->compile();
26+
27+
// Ensure assertion for strict mode
28+
$this->assertFalse($this->container->has('no_service'));
2629
} catch (\Exception $e) {
2730
$this->fail('The compiler pass should not fail with an empty container.');
2831
}

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit bootstrap="./vendor/autoload.php" colors="true">
2+
<phpunit bootstrap="./vendor/autoload.php" colors="true" strict="true">
33
<testsuites>
44
<testsuite>
55
<directory suffix="Test.php">./Tests</directory>

0 commit comments

Comments
 (0)