Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function requireOnce(string $path)
 {
     if (!is_file($path)) {
         throw FileNotFoundException::fromPath($path);
     }
     require_once $path;
 }
Exemplo n.º 2
0
 public function test_that_from_path_returns_expected_instance()
 {
     $exception = FileNotFoundException::fromPath('/tmp/file.txt');
     $this->assertSame('File not found: /tmp/file.txt', $exception->getMessage());
 }