Пример #1
0
 /**
  * @depends Nelmio\Alice\ParameterTest::testIsImmutable
  */
 public function testWithersReturnNewModifiedObject()
 {
     $bag = new ParameterBag(['foo' => 'bar']);
     $newBag = $bag->with(new Parameter('ping', 'pong'));
     $this->assertEquals(new ParameterBag(['foo' => 'bar']), $bag);
     $this->assertEquals(new ParameterBag(['foo' => 'bar', 'ping' => 'pong']), $newBag);
 }