use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
use Symfony\Component\DependencyInjection\ServiceLocator;
use Symfony\Contracts\Service\ResetInterface;
class ContainerTest extends TestCase
{ public function testConstructor() { $sc =
new Container();
$this->
assertSame($sc,
$sc->
get('service_container'
), '__construct() automatically registers itself as a service'
);
$sc =
new Container(new ParameterBag(['foo' => 'bar'
]));
$this->
assertEquals(['foo' => 'bar'
],
$sc->
getParameterBag()->
all(), '__construct() takes an array of parameters as its first argument'
);
} /**
* @dataProvider dataForTestCamelize
*/
public function testCamelize($id,
$expected) { $this->
assertEquals($expected, Container::
camelize($id),
sprintf('Container::camelize("%s")',
$id));
}