function OptimizedPhpArrayDumperTest::getServiceCall

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php \Drupal\Tests\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumperTest::getServiceCall()
  2. 8.9.x core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php \Drupal\Tests\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumperTest::getServiceCall()
  3. 11.x core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php \Drupal\Tests\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumperTest::getServiceCall()

Helper function to return a service definition.

3 calls to OptimizedPhpArrayDumperTest::getServiceCall()
OptimizedPhpArrayDumperTest::getDefinitionsDataProvider in core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php
Data provider for testGetServiceDefinitions().
OptimizedPhpArrayDumperTest::testGetServiceDefinitionForObjectServiceId in core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php
Tests that the correct RuntimeException is thrown for dumping an object.
OptimizedPhpArrayDumperTest::testGetServiceDefinitionWithReferenceToAlias in core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php
Tests that references to aliases work correctly.
1 method overrides OptimizedPhpArrayDumperTest::getServiceCall()
PhpArrayDumperTest::getServiceCall in core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/PhpArrayDumperTest.php
Helper function to return a service definition.

File

core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php, line 479

Class

OptimizedPhpArrayDumperTest
@coversDefaultClass \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper @group DependencyInjection

Namespace

Drupal\Tests\Component\DependencyInjection\Dumper

Code

protected static function getServiceCall($id, $invalid_behavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE) {
    return (object) [
        'type' => 'service',
        'id' => $id,
        'invalidBehavior' => $invalid_behavior,
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.