Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit56b5f41

Browse files
Merge branch '2.7' into 2.8
* 2.7: [PropertyAccess] Fix for PHP 7.0.7
2 parentsfc32e6a +a350459 commit56b5f41

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

‎src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,9 @@ public function testSetValueThrowsNoExceptionIfIndexNotFoundAndIndexExceptionsEn
242242
*/
243243
publicfunctiontestSetValueThrowsExceptionIfNotArrayAccess()
244244
{
245-
$this->propertyAccessor->setValue(new \stdClass(),'[index]','Updated');
245+
$object =new \stdClass();
246+
247+
$this->propertyAccessor->setValue($object,'[index]','Updated');
246248
}
247249

248250
publicfunctiontestSetValueUpdatesMagicSet()
@@ -259,7 +261,9 @@ public function testSetValueUpdatesMagicSet()
259261
*/
260262
publicfunctiontestSetValueThrowsExceptionIfThereAreMissingParameters()
261263
{
262-
$this->propertyAccessor->setValue(newTestClass('Bernhard'),'publicAccessorWithMoreRequiredParameters','Updated');
264+
$object =newTestClass('Bernhard');
265+
266+
$this->propertyAccessor->setValue($object,'publicAccessorWithMoreRequiredParameters','Updated');
263267
}
264268

265269
/**
@@ -527,7 +531,9 @@ public function testIsWritableForReferenceChainIssue($object, $path, $value)
527531
*/
528532
publicfunctiontestThrowTypeError()
529533
{
530-
$this->propertyAccessor->setValue(newTypeHinted(),'date','This is a string, \DateTime expected.');
534+
$object =newTypeHinted();
535+
536+
$this->propertyAccessor->setValue($object,'date','This is a string, \DateTime expected.');
531537
}
532538

533539
publicfunctiontestSetTypeHint()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp