getSize() public method

Returns size of a file.
public getSize ( $path ) : integer
$path
return integer
コード例 #1
0
 /**
  *
  */
 public function testApiGetSize_ThrowsException_WhenGetSizeOnModelThrowsException()
 {
     $path = 'path';
     $expected = new Exception();
     $ex = null;
     $this->expect('getSize', [$path])->willThrow($expected);
     try {
         $this->fs->getSize($path);
     } catch (Exception $ex) {
     }
     $this->assertInstanceOf(ReadException::class, $ex);
     $this->assertSame($expected, $ex->getPrevious());
 }