public function testSizeFailing() { $dir = __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures' . DIRECTORY_SEPARATOR . 'directory'; $path = $dir . DIRECTORY_SEPARATOR . 'test.copy.gif'; @unlink($path); copy(__DIR__ . '/Fixtures/test.gif', $path); $file = new File($path); @unlink($path); $this->setExpectedException('Symfony\\Component\\HttpFoundation\\File\\Exception\\FileException'); $file->size($path); }