File tree 2 files changed +28
-0
lines changed
src/Symfony/Component/DependencyInjection
2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 12
12
namespace Symfony \Component \DependencyInjection \ParameterBag ;
13
13
14
14
use Symfony \Component \DependencyInjection \Exception \RuntimeException ;
15
+ use Symfony \Component \DependencyInjection \Exception \InvalidArgumentException ;
15
16
16
17
/**
17
18
* @author Nicolas Grekas <p@tchwork.com>
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of the Symfony package.
5
+ *
6
+ * (c) Fabien Potencier <fabien@symfony.com>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace Symfony \Component \DependencyInjection \Tests \ParameterBag ;
13
+
14
+ use Symfony \Component \DependencyInjection \Exception \InvalidArgumentException ;
15
+ use Symfony \Component \DependencyInjection \ParameterBag \EnvPlaceholderParameterBag ;
16
+
17
+ class EnvPlaceholderParameterBagTest extends \PHPUnit_Framework_TestCase
18
+ {
19
+ /**
20
+ * @expectedException InvalidArgumentException
21
+ */
22
+ public function testGetThrowsInvalidArgumentExceptionIfEnvNameContainsNonWordCharacters ()
23
+ {
24
+ $ bag = new EnvPlaceholderParameterBag ();
25
+ $ bag ->get ('env(%foo%) ' );
26
+ }
27
+ }
You can’t perform that action at this time.
0 commit comments