Skip to content

Commit 801c838

Browse files
authored
Merge pull request #192 from phpcr/phpunit9
phpunit 9
2 parents c88208a + 1854d5d commit 801c838

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

tests/PHPCR/Tests/Util/Console/Command/NodesUpdateCommandTest.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,23 +95,22 @@ public function testNodeUpdate($options)
9595
'--remove-mixin' => [],
9696
];
9797

98+
$setPropertyArguments = [];
9899
foreach ($options['setProp'] as $setProp) {
99100
list($prop, $value) = $setProp;
100-
$this->node1->expects($this->at(0))
101-
->method('setProperty')
102-
->with($prop, $value);
103-
101+
$setPropertyArguments[] = [$prop, $value, null];
104102
$args['--set-prop'][] = $prop.'='.$value;
105103
}
106104

107105
foreach ($options['removeProp'] as $prop) {
108-
$this->node1->expects($this->at(1))
109-
->method('setProperty')
110-
->with($prop, null);
111-
106+
$setPropertyArguments[] = [$prop, null, null];
112107
$args['--remove-prop'][] = $prop;
113108
}
114109

110+
$this->node1
111+
->method('setProperty')
112+
->withConsecutive(...$setPropertyArguments);
113+
115114
foreach ($options['addMixin'] as $mixin) {
116115
$this->node1->expects($this->once())
117116
->method('addMixin')

0 commit comments

Comments
 (0)