Esempio n. 1
0
 public function testCanCheckForItsOwnExistence()
 {
     $directory = GaufretteDirectory::createInMemory();
     $directory->putContents('/foo/bar/bar.php', 'bar');
     $realfile = new File($directory, '/foo/bar/bar.php');
     $nonfile = new File($directory, '/foo/baz.php');
     $this->assertTrue($realfile->exists());
     $this->assertFalse($nonfile->exists());
 }
Esempio n. 2
0
 public function testCanCheckForItsOwnExistence()
 {
     $filesystem = Filesystem::createInMemory();
     $filesystem->put('/foo/bar/bar.php', 'bar');
     $realfile = new File($filesystem, '/foo/bar/bar.php');
     $nonfile = new File($filesystem, '/foo/baz.php');
     $this->assertTrue($realfile->exists());
     $this->assertFalse($nonfile->exists());
 }