You are here

public function PhpDumperTest::testAddServiceInvalidServiceId in Service Container 7

Same name and namespace in other branches
  1. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php \Symfony\Component\DependencyInjection\Tests\Dumper\PhpDumperTest::testAddServiceInvalidServiceId()

@expectedException \InvalidArgumentException @expectedExceptionMessage Service id "bar$" cannot be converted to a valid PHP method name.

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php, line 151

Class

PhpDumperTest

Namespace

Symfony\Component\DependencyInjection\Tests\Dumper

Code

public function testAddServiceInvalidServiceId() {
  $container = new ContainerBuilder();
  $container
    ->register('bar$', 'FooClass');
  $dumper = new PhpDumper($container);
  $dumper
    ->dump();
}