Skip to content

Commit f395958

Browse files
committed
[Validator] Fixed StaticMethodLoader on systems that don't have E_STRICT enabled by default
1 parent 5c38eef commit f395958

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)