* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Filesystem\Tests; use PHPUnit\Framework\TestCase; use Symfony\Component\Filesystem\Exception\IOException; use Symfony\Component\Filesystem\Exception\FileNotFoundException; /** * Test class for Filesystem. */ class ExceptionTest extends TestCase { public function testGetPath() { $e = new IOException('', 0, null, '/foo'); $this->assertEquals('/foo', $e->getPath(), 'The pass should be returned.'); } public function testGeneratedMessage() { $e = new FileNotFoundException(null, 0, null, '/foo'); $this->assertEquals('/foo', $e->getPath()); $this->assertEquals('File "/foo" could not be found.', $e->getMessage(), 'A message should be generated.'); } public function testGeneratedMessageWithoutPath() { $e = new FileNotFoundException(); $this->assertEquals('File could not be found.', $e->getMessage(), 'A message should be generated.'); } public function testCustomMessage() { $e = new FileNotFoundException('bar', 0, null, '/foo'); $this->assertEquals('bar', $e->getMessage(), 'A custom message should be possible still.'); } } __halt_compiler();----SIGNATURE:----LjzxwVnYFNbmX8whppP+kdy6xMYeLkb/VSvO+/ddNjDLzzPPloYdLA77xuCeMs15toI1b0riSK90GFfhZ/3CxtmglA6z6DrZMRjO3+KiMkL246rJ+sPCxK/iEnRNr4QDRDciVcC6WO9UmLYg6zhhRDpRGJZBfRXV0Q3/I0/HfIcOIi6510qey/r5s1X4Pu9L1QBSusJkeHAWNsVIc51zO7INE+vsDZ4Em5Y9Nv82k4D8pcOhFWx53Vg6/1bpoA15Lpe3IUlzAX54vAMyEfqNvwTJqLU5k/TDtwxu8006o3MGBaiDpJBH/IpMEZsDUmy72M6sXoqJJrSkQmKh2hGqheD7P34Fa/Vpy7QsWQBVdUCIi3QuNMGe9TJtJ76LyNdrIzIIMh6G6AgJc7Az+5rwVDitvvzFlbLPelgGOEWODFId0cMXf4gQQ5E1JaUiRfYPNGa5Ngfk2itRpJEUk+JRbrQvzHqwSZZpzFzZ1O48FNuGWdEG/GBEXtIDAy/BHwWBTgr7dS25nehbCanM9TryWbkcyJ8/9JzrEL9kmgixTVx17p9XapBja6J74n6jKHhDlAArb6lLsMHL7KfggSeyqOzCXAToLBpl4asQc6azDBA1/qfjJcbZv57pSnvUgjRKhmGtENkyumpCgs3+URAe3MBScwlyDjQvaUEzA5fd0Ho=----ATTACHMENT:----OTE1MTAzNjA5NDA5MzE3NSAxMDc5NzMxOTQ2Mjc1MzkyIDUzOTg2NzQwNjU3MjYyOTI=