/**
  * Constructor.
  *
  * @param array $parameters
  */
 public function __construct(array $parameters = array())
 {
     $this->parameters = $parameters;
     parent::__construct(array(), new Resolver($this, true));
 }
 public function testMultipleResolve()
 {
     $parameter = new ParameterBag(array('message' => 'Hello %name%', 'name' => 'iqbal'));
     $parameter->getResolver()->resolve();
     $expected = array('message' => 'Hello iqbal', 'name' => 'iqbal');
     $this->assertTrue($parameter->getResolver()->isResolved());
     $this->assertSame($expected, $parameter->all());
     $parameter->getResolver()->resolve();
     $this->assertSame($expected, $parameter->all());
     $this->assertTrue($parameter->getResolver()->isResolved());
 }