req() public method

Require a file.
public req ( string $path ) : mixed
$path string
return mixed
示例#1
0
 /**
  *
  */
 public function testApiReq_ThrowsException_WhenModelReadThrowsException()
 {
     $path = 'path';
     $ex = null;
     $this->expect('read', [$path])->willThrow($expected = new Exception());
     try {
         $this->fs->req($path);
     } catch (Exception $ex) {
     }
     $this->assertInstanceOf(ReadException::class, $ex);
     $this->assertSame($expected, $ex->getPrevious());
 }