public function ContainerTest::testConstructorArgs in Little helpers 7.2
Test a string spec.
File
- tests/
Services/ ContainerTest.php, line 27
Class
- ContainerTest
- Test the service container.
Namespace
Drupal\little_helpers\ServicesCode
public function testConstructorArgs() {
$specs['a'] = [
'class' => \SplFixedArray::class,
'arguments' => [
1,
],
];
$container = new Container();
$container
->setSpecs($specs);
$a = $container
->loadService('a');
$this
->assertEqual(1, $a
->getSize());
}