[Validator] Fixed StaticMethodLoader on systems that don't have E_STRICT enabled by default

This commit is contained in:
Bernhard Schussek 2014-05-21 15:05:30 +02:00
parent 8850274234
commit a470ae2bb9
1 changed files with 14 additions and 0 deletions

View File

@ -17,6 +17,18 @@ use Symfony\Component\Validator\Tests\Fixtures\ConstraintA;
class StaticMethodLoaderTest extends \PHPUnit_Framework_TestCase
{
private $errorLevel;
protected function setUp()
{
$this->errorLevel = error_reporting();
}
protected function tearDown()
{
error_reporting($this->errorLevel);
}
public function testLoadClassMetadataReturnsTrueIfSuccessful()
{
$loader = new StaticMethodLoader('loadMetadata');
@ -78,6 +90,8 @@ class StaticMethodLoaderTest extends \PHPUnit_Framework_TestCase
public function testLoadClassMetadataIgnoresAbstractMethods()
{
error_reporting(E_ALL | E_STRICT);
$loader = new StaticMethodLoader('loadMetadata');
$caught = false;
try {