Skip to content

Commit

Permalink
Convert mocking setup for test
Browse files Browse the repository at this point in the history
  • Loading branch information
frankdejonge committed Oct 13, 2019
1 parent f9ae8a7 commit 9985c9f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/MountManagerTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ public function provideMountSchemas()
public function testMountSchemaTypes($schema)
{
$manager = new MountManager();
$mock = $this->getMockBuilder('League\Flysystem\Filesystem')->disableOriginalConstructor()->getMock();
$mock->method('read')->with('file.ext')->willReturn('a result');
$manager->mountFilesystem($schema, $mock);
$mock = $this->prophesize(FilesystemInterface::class);
$mock->read('file.ext')->willReturn('a result');
$manager->mountFilesystem($schema, $mock->reveal());
$this->assertEquals($manager->read($schema . '://file.ext'), 'a result');
}

Expand Down

0 comments on commit 9985c9f

Please sign in to comment.