Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions tests/NestedSetsBehaviorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -2024,7 +2024,7 @@ public function testPrependToWithRunValidationParameterUsingStrictValidation():

$childNode2 = new TreeWithStrictValidation(
[
'name' => '',
'name' => 'x',
],
);

Expand All @@ -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\'.',
);
}
}