function ContainerTest::testSerialize

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/DependencyInjection/ContainerTest.php \Drupal\Tests\Core\DependencyInjection\ContainerTest::testSerialize()
  2. 10 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 17

Class

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

Namespace

Drupal\Tests\Core\DependencyInjection

Code

public function testSerialize() {
    $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.