diff --git a/tests/NestedSetsBehaviorTest.php b/tests/NestedSetsBehaviorTest.php index bdac7d6..42fa5a2 100644 --- a/tests/NestedSetsBehaviorTest.php +++ b/tests/NestedSetsBehaviorTest.php @@ -2006,11 +2006,11 @@ public function testPrependToWithRunValidationParameterUsingStrictValidation(): $childNode = new TreeWithStrictValidation( [ - 'name' => '', + 'name' => 'x', ], ); - $resultWithValidation = $childNode->prependTo($parentNode, true); + $resultWithValidation = $childNode->prependTo($parentNode); $hasError1 = $childNode->hasErrors(); self::assertFalse( @@ -2024,7 +2024,7 @@ public function testPrependToWithRunValidationParameterUsingStrictValidation(): $childNode2 = new TreeWithStrictValidation( [ - 'name' => '', + 'name' => 'x', ], ); @@ -2039,5 +2039,10 @@ public function testPrependToWithRunValidationParameterUsingStrictValidation(): $hasError2, 'Node should not have validation errors when \'runValidation=false\' because validation was skipped.', ); + self::assertSame( + 'x', + $childNode2->name, + 'Node name should remain unchanged after \'prependTo()\' with \'runValidation=false\'.', + ); } }