Procházet zdrojové kódy

merged branch stloyd/exception_typo (PR #1427)

Commits
-------

0d3fb6f Missing quote in IniFileLoader exception

Discussion
----------

Missing quote in IniFileLoader exception
Fabien Potencier před 14 roky
rodič
revize
6d375f74ba

+ 1 - 1
src/Symfony/Component/DependencyInjection/Loader/IniFileLoader.php

@@ -37,7 +37,7 @@ class IniFileLoader extends FileLoader
 
         $result = parse_ini_file($path, true);
         if (false === $result || array() === $result) {
-            throw new \InvalidArgumentException(sprintf('The %s file is not valid.', $file));
+            throw new \InvalidArgumentException(sprintf('The "%s" file is not valid.', $file));
         }
 
         if (isset($result['parameters']) && is_array($result['parameters'])) {

+ 1 - 1
tests/Symfony/Tests/Component/DependencyInjection/Loader/IniFileLoaderTest.php

@@ -48,7 +48,7 @@ class IniFileLoaderTest extends \PHPUnit_Framework_TestCase
             $this->fail('->load() throws an InvalidArgumentException if the loaded file is not parseable');
         } catch (\Exception $e) {
             $this->assertInstanceOf('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the loaded file is not parseable');
-            $this->assertEquals('The nonvalid.ini file is not valid.', $e->getMessage(), '->load() throws an InvalidArgumentException if the loaded file is not parseable');
+            $this->assertEquals('The "nonvalid.ini" file is not valid.', $e->getMessage(), '->load() throws an InvalidArgumentException if the loaded file is not parseable');
         }
     }