function ContainerTest::testSerialize

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

Tests serialization.

File

core/tests/Drupal/Tests/Core/DependencyInjection/ContainerTest.php, line 19

Class

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

Namespace

Drupal\Tests\Core\DependencyInjection

Code

public function testSerialize() : void {
    $container = new Container();
    $this->expectException(\AssertionError::class);
    serialize($container);
}

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