Skip to content

Commit b19a9a1

Browse files
committed
minor #10956 [Validator] Fixed StaticMethodLoaderTest on systems that don't have E_STRICT enabled by default (webmozart)
This PR was merged into the 2.3 branch. Discussion ---------- [Validator] Fixed StaticMethodLoaderTest on systems that don't have E_STRICT enabled by default | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- a470ae2 [Validator] Fixed StaticMethodLoader on systems that don't have E_STRICT enabled by default
2 parents e159969 + f395958 commit b19a9a1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Tests/Mapping/Loader/StaticMethodLoaderTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@
1717

1818
class StaticMethodLoaderTest extends \PHPUnit_Framework_TestCase
1919
{
20+
private $errorLevel;
21+
22+
protected function setUp()
23+
{
24+
$this->errorLevel = error_reporting();
25+
}
26+
27+
protected function tearDown()
28+
{
29+
error_reporting($this->errorLevel);
30+
}
31+
2032
public function testLoadClassMetadataReturnsTrueIfSuccessful()
2133
{
2234
$loader = new StaticMethodLoader('loadMetadata');
@@ -78,6 +90,8 @@ public function testLoadClassMetadataInAbstractClasses()
7890

7991
public function testLoadClassMetadataIgnoresAbstractMethods()
8092
{
93+
error_reporting(E_ALL | E_STRICT);
94+
8195
$loader = new StaticMethodLoader('loadMetadata');
8296
$caught = false;
8397
try {

0 commit comments

Comments
 (0)