StringSerializationTest.php

Namespace

Drupal\KernelTests\Core\DependencyInjection

File

core/tests/Drupal/KernelTests/Core/DependencyInjection/StringSerializationTest.php

View source
<?php

namespace Drupal\KernelTests\Core\DependencyInjection;

use Drupal\KernelTests\KernelTestBase;

/**
 * Tests serialization of string services.
 *
 * @group DependencyInjection
 * @group legacy
 */
class StringSerializationTest extends KernelTestBase {
  
  /**
   * Tests that strings are not put into the container class mapping.
   */
  public function testSerializeString() {
    $this->assertIsString($this->container
      ->get('app.root'));
    $this->container
      ->getServiceIdMappings();
    $this->assertIsString($this->container
      ->get('app.root'));
  }

}

Classes

Title Deprecated Summary
StringSerializationTest Tests serialization of string services.

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