ContainerTest.php

Same filename in this branch
  1. 11.x core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php
Same filename and directory in other branches
  1. 10 core/tests/Drupal/Tests/Core/DependencyInjection/ContainerTest.php
  2. 10 core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php
  3. 9 core/tests/Drupal/Tests/Core/DependencyInjection/ContainerTest.php
  4. 9 core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php
  5. 8.9.x core/tests/Drupal/Tests/Core/DependencyInjection/ContainerTest.php
  6. 8.9.x core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php

Namespace

Drupal\Tests\Core\DependencyInjection

File

core/tests/Drupal/Tests/Core/DependencyInjection/ContainerTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\Core\DependencyInjection;

use Drupal\Core\DependencyInjection\Container;
use Drupal\Tests\UnitTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;

/**
 * Tests Drupal\Core\DependencyInjection\Container.
 */
class ContainerTest extends UnitTestCase {
  
  /**
   * Tests serialization.
   */
  public function testSerialize() : void {
    $container = new Container();
    $this->expectException(\AssertionError::class);
    serialize($container);
  }

}

Classes

Title Deprecated Summary
ContainerTest Tests Drupal\Core\DependencyInjection\Container.

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