public function testCopyFail() { $mock = Mockery::mock('Concrete\\Flysystem\\AdapterInterface'); $mock->shouldReceive('write')->andReturn(array('path' => 'path.txt')); $mock->shouldReceive('copy')->andReturn(false); $mock->shouldReceive('has')->with('path.txt')->andReturn(false, true); $mock->shouldReceive('has')->with('new.txt')->andReturn(false); $filesystem = new Filesystem($mock); $filesystem->write('path.txt', 'content'); $this->assertFalse($filesystem->copy('path.txt', 'new.txt')); }