From 1854d5dd4baee5c5cb2f87d2d56a8cb3ee26251a Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Thu, 8 Oct 2020 11:04:31 +0200 Subject: [PATCH] phpunit 9 --- .../Console/Command/NodesUpdateCommandTest.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/PHPCR/Tests/Util/Console/Command/NodesUpdateCommandTest.php b/tests/PHPCR/Tests/Util/Console/Command/NodesUpdateCommandTest.php index 7d3a83e..542fe10 100644 --- a/tests/PHPCR/Tests/Util/Console/Command/NodesUpdateCommandTest.php +++ b/tests/PHPCR/Tests/Util/Console/Command/NodesUpdateCommandTest.php @@ -95,23 +95,22 @@ public function testNodeUpdate($options) '--remove-mixin' => [], ]; + $setPropertyArguments = []; foreach ($options['setProp'] as $setProp) { list($prop, $value) = $setProp; - $this->node1->expects($this->at(0)) - ->method('setProperty') - ->with($prop, $value); - + $setPropertyArguments[] = [$prop, $value, null]; $args['--set-prop'][] = $prop.'='.$value; } foreach ($options['removeProp'] as $prop) { - $this->node1->expects($this->at(1)) - ->method('setProperty') - ->with($prop, null); - + $setPropertyArguments[] = [$prop, null, null]; $args['--remove-prop'][] = $prop; } + $this->node1 + ->method('setProperty') + ->withConsecutive(...$setPropertyArguments); + foreach ($options['addMixin'] as $mixin) { $this->node1->expects($this->once()) ->method('addMixin')