8000 fix tests · pacebale/laravel-filemanager@1d07319 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1d07319

Browse files
committed
fix tests
1 parent 97af39d commit 1d07319

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

tests/LfmPathTest.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,16 @@ public function testPath()
9696
public function testUrl()
9797
{
9898
$helper = m::mock(Lfm::class);
99-
$helper->shouldReceive('getRootFolder')->once()->andReturn('/foo');
100-
$helper->shouldReceive('input')->with('working_dir')->once()->andReturnNull();
99+
$helper->shouldReceive('getRootFolder')->andReturn('/foo');
100+
$helper->shouldReceive('input')->with('working_dir')->andReturnNull();
101101
$helper->shouldReceive('getCategoryName')->andReturn('files');
102102
$helper->shouldReceive('isRunningOnWindows')->andReturn(false);
103+
$helper->shouldReceive('ds')->andReturn('/');
104+
105+
$storage = m::mock(LfmStorage::class);
106+
$storage->shouldReceive('url')->andReturn('/files/foo/foo');
107+
108+
$helper->shouldReceive('getStorage')->andReturn($storage);
103109

104110
$path = new LfmPath($helper);
105111

@@ -205,7 +211,7 @@ public function testCreateFolder()
205211

206212
$path = new LfmPath($helper);
207213

208-
$this->assertTrue($path->createFolder('bar'));
214+
$this->assertNull($path->createFolder('bar'));
209215
}
210216

211217
public function testCreateFolderButFolderAlreadyExists()

0 commit comments

Comments
 (0)
0