4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\DependencyInjection\Tests\ParameterBag;
14 use PHPUnit\Framework\TestCase;
15 use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
17 class FrozenParameterBagTest extends TestCase
19 public function testConstructor()
25 $bag = new FrozenParameterBag($parameters);
26 $this->assertEquals($parameters, $bag->all(), '__construct() takes an array of parameters as its first argument');
30 * @expectedException \LogicException
32 public function testClear()
34 $bag = new FrozenParameterBag(array());
39 * @expectedException \LogicException
41 public function testSet()
43 $bag = new FrozenParameterBag(array());
44 $bag->set('foo', 'bar');
48 * @expectedException \LogicException
50 public function testAdd()
52 $bag = new FrozenParameterBag(array());
57 * @expectedException \LogicException
59 public function testRemove()
61 $bag = new FrozenParameterBag(array('foo' => 'bar'));