public function testFileIsFile() { $response = ['type' => 'file']; $prophecy = $this->prophesize('League\\Flysystem\\FilesystemInterface'); $prophecy->getMetadata('path.txt')->willReturn($response); $filesystem = $prophecy->reveal(); $file = new File(null, 'path.txt'); $file->setFilesystem($filesystem); $this->assertTrue($file->isFile()); }