[PropertyAccess] Fix for PHP 7.0.7

This commit is contained in:
Nicolas Grekas 2016-05-29 11:31:47 +02:00
parent c59a3da606
commit a125af74f8
2 changed files with 9 additions and 3 deletions

View File

@ -173,7 +173,9 @@ abstract class PropertyAccessorCollectionTest extends \PHPUnit_Framework_TestCas
*/
public function testSetValueThrowsExceptionIfArrayAccessExpected()
{
$this->propertyAccessor->setValue(new \stdClass(), '[firstName]', 'Bernhard');
$object = new \stdClass();
$this->propertyAccessor->setValue($object, '[firstName]', 'Bernhard');
}
public function testSetValueCallsAdderAndRemoverForCollections()

View File

@ -311,7 +311,9 @@ class PropertyAccessorTest extends \PHPUnit_Framework_TestCase
*/
public function testSetValueThrowsExceptionIfGetterIsNotPublic()
{
$this->propertyAccessor->setValue(new Author(), 'privateSetter', 'foobar');
$object = new Author();
$this->propertyAccessor->setValue($object, 'privateSetter', 'foobar');
}
/**
@ -414,7 +416,9 @@ class PropertyAccessorTest extends \PHPUnit_Framework_TestCase
*/
public function testThrowTypeError()
{
$this->propertyAccessor->setValue(new TypeHinted(), 'date', 'This is a string, \DateTime expected.');
$object = new TypeHinted();
$this->propertyAccessor->setValue($object, 'date', 'This is a string, \DateTime expected.');
}
public function testSetTypeHint()