Пример #1
0
 public function testGetSize()
 {
     $file = new \r8\FileSys\File($this->file);
     $this->assertType('integer', $file->getSize());
     $this->assertGreaterThan(0, $file->getSize());
     $file = new \r8\FileSys\File("/path/to/missing/file");
     try {
         $file->getSize();
         $this->fail("An expected exception was not thrown");
     } catch (\r8\Exception\FileSystem\Missing $err) {
         $this->assertSame("Path does not exist", $err->getMessage());
     }
 }