public function testToArray() { $bag = new ParameterBag(); $this->assertEquals([], $bag->toArray()); $bag = new ParameterBag(['foo' => 'bar', 'baz' => $std = new \stdClass()]); $this->assertEquals(['foo' => 'bar', 'baz' => $std], $bag->toArray()); }
public function __construct(ParameterBag $parameters, ObjectBag $objects) { $this->parameters = $parameters->toArray(); $this->objects = $objects->toArray(); }