You are here

public function ContainerTest::testInjection in Little helpers 7.2

Test injecting an object.

File

tests/Services/ContainerTest.php, line 113

Class

ContainerTest
Test the service container.

Namespace

Drupal\little_helpers\Services

Code

public function testInjection() {
  $container = new Container();
  $container
    ->inject('foo', 'bar');
  $this
    ->assertEqual('bar', $container
    ->loadService('foo'));
}