Example #1
0
 public function testGetHandleOpen()
 {
     $file = new File(parent::$tempDir . "garbage.txt");
     $file->open('w+');
     $lockable = new LockableFile($file);
     $this->assertEquals($file->getHandle(), $lockable->file()->getHandle());
 }
Example #2
0
 public function testDropOpen()
 {
     $file = new File(parent::$tempDir . "something.txt");
     $file->open('w+');
     $this->assertNotNull($file->getHandle());
     $this->assertTrue($file->exists());
     $file->drop();
     $this->assertTrue($file->exists());
 }