function ContainerTest::getCollection

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php \Drupal\Tests\Component\DependencyInjection\ContainerTest::getCollection()
  2. 10 core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php \Drupal\Tests\Component\DependencyInjection\ContainerTest::getCollection()
  3. 11.x core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php \Drupal\Tests\Component\DependencyInjection\ContainerTest::getCollection()

Helper function to return a machine-optimized collection.

1 call to ContainerTest::getCollection()
ContainerTest::getMockContainerDefinition in core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php
Gets a mock container definition.
1 method overrides ContainerTest::getCollection()
PhpArrayContainerTest::getCollection in core/tests/Drupal/Tests/Component/DependencyInjection/PhpArrayContainerTest.php
Helper function to return a machine-optimized '@notation'.

File

core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php, line 995

Class

ContainerTest
@coversDefaultClass \Drupal\Component\DependencyInjection\Container @group DependencyInjection

Namespace

Drupal\Tests\Component\DependencyInjection

Code

protected function getCollection($collection, $resolve = TRUE) {
    return (object) [
        'type' => 'collection',
        'value' => $collection,
        'resolve' => $resolve,
    ];
}

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