You are here

public function ContainerTest::testStringSpec in Little helpers 7.2

Test a string spec.

File

tests/Services/ContainerTest.php, line 15

Class

ContainerTest
Test the service container.

Namespace

Drupal\little_helpers\Services

Code

public function testStringSpec() {
  $class_a = get_class($this
    ->createMock('stdclass'));
  $specs['a'] = $class_a;
  $container = new Container();
  $container
    ->setSpecs($specs);
  $a = $container
    ->loadService('a');
  $this
    ->assertInstanceOf($class_a, $a);
}