-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathNodeMoveCommandTest.php
More file actions
43 lines (36 loc) · 948 Bytes
/
NodeMoveCommandTest.php
File metadata and controls
43 lines (36 loc) · 948 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
declare(strict_types=1);
namespace PHPCR\Tests\Util\Console\Command;
use PHPCR\Util\Console\Command\NodeMoveCommand;
class NodeMoveCommandTest extends BaseCommandTest
{
/**
* @return array<array<mixed[]>>
*/
public function provideCommand(): array
{
return [
[
[
'source' => '/foo',
'destination' => '/bar',
],
],
];
}
/**
* @dataProvider provideCommand
*
* @param array<mixed[]> $args
*/
public function testCommand(array $args): void
{
$this->session->expects($this->once())
->method('move')
->with($args['source'], $args['destination']);
$this->session->expects($this->once())
->method('save');
$this->addCommand(new NodeMoveCommand());
$this->executeCommand('phpcr:node:move', $args);
}
}