Conditions | 1 |
Paths | 1 |
Total Lines | 23 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
25 | public function testCreateFsOperator() |
||
26 | { |
||
27 | $fsOperator = $this->createMock(FilesystemOperator::class); |
||
28 | |||
29 | $decorated = $this->createMock(FilesystemFacadeInterface::class); |
||
30 | $decorated |
||
31 | ->expects($this->once()) |
||
32 | ->method('createFsOperator') |
||
33 | ->with('test') |
||
34 | ->willReturn($fsOperator); |
||
35 | |||
36 | $fsFactory = $this->createMock(FsFactoryInterface::class); |
||
37 | $fsFactory->expects($this->never())->method('create'); |
||
38 | |||
39 | $cfg = $this->createMock(FilesystemLocalAdapterPluginConfigurationInterface::class); |
||
40 | |||
41 | $decorator = new LocalFilesystemFacadeDecorator( |
||
42 | $decorated, |
||
43 | $fsFactory, |
||
44 | $cfg |
||
45 | ); |
||
46 | |||
47 | $this->assertEquals($fsOperator, $decorator->createFsOperator('test')); |
||
48 | } |
||
50 |