[DependencyInjection] Env parameterbag fix: use the correct exception class.
This commit is contained in:
parent
93c0e8adc2
commit
b016c6029b
@ -12,6 +12,7 @@
|
||||
namespace Symfony\Component\DependencyInjection\ParameterBag;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
|
||||
/**
|
||||
* @author Nicolas Grekas <p@tchwork.com>
|
||||
|
@ -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%)');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user