Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DependencyInjection] Env parameterbag fix: use the correct exception…
… class.
- Loading branch information
1 parent
fe652a5
commit a6a0251
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Component\DependencyInjection\Tests\ParameterBag; | ||
|
||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; | ||
use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag; | ||
|
||
class EnvPlaceholderParameterBagTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @expectedException InvalidArgumentException | ||
*/ | ||
public function testGetThrowsInvalidArgumentExceptionIfEnvNameContainsNonWordCharacters() | ||
{ | ||
$bag = new EnvPlaceholderParameterBag(); | ||
$bag->get('env(%foo%)'); | ||
} | ||
} |