[Validator] Fixed StaticMethodLoader on systems that don't have E_STRICT enabled by default
This commit is contained in:
parent
8850274234
commit
a470ae2bb9
|
@ -17,6 +17,18 @@ use Symfony\Component\Validator\Tests\Fixtures\ConstraintA;
|
||||||
|
|
||||||
class StaticMethodLoaderTest extends \PHPUnit_Framework_TestCase
|
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()
|
public function testLoadClassMetadataReturnsTrueIfSuccessful()
|
||||||
{
|
{
|
||||||
$loader = new StaticMethodLoader('loadMetadata');
|
$loader = new StaticMethodLoader('loadMetadata');
|
||||||
|
@ -78,6 +90,8 @@ class StaticMethodLoaderTest extends \PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
public function testLoadClassMetadataIgnoresAbstractMethods()
|
public function testLoadClassMetadataIgnoresAbstractMethods()
|
||||||
{
|
{
|
||||||
|
error_reporting(E_ALL | E_STRICT);
|
||||||
|
|
||||||
$loader = new StaticMethodLoader('loadMetadata');
|
$loader = new StaticMethodLoader('loadMetadata');
|
||||||
$caught = false;
|
$caught = false;
|
||||||
try {
|
try {
|
||||||
|
|
Reference in New Issue