function TypedDataNormalizerTest::testNormalize

Same name and namespace in other branches
  1. 11.x core/modules/serialization/tests/src/Unit/Normalizer/TypedDataNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\TypedDataNormalizerTest::testNormalize()
  2. 9 core/modules/serialization/tests/src/Unit/Normalizer/TypedDataNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\TypedDataNormalizerTest::testNormalize()
  3. 8.9.x core/modules/serialization/tests/src/Unit/Normalizer/TypedDataNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\TypedDataNormalizerTest::testNormalize()
  4. main core/modules/serialization/tests/src/Unit/Normalizer/TypedDataNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\TypedDataNormalizerTest::testNormalize()

Tests the normalize() method.

File

core/modules/serialization/tests/src/Unit/Normalizer/TypedDataNormalizerTest.php, line 52

Class

TypedDataNormalizerTest
@coversDefaultClass \Drupal\serialization\Normalizer\TypedDataNormalizer[[api-linebreak]] @group serialization

Namespace

Drupal\Tests\serialization\Unit\Normalizer

Code

public function testNormalize() : void {
  $this->typedData
    ->expects($this->once())
    ->method('getValue')
    ->willReturn('test');
  $this->assertEquals('test', $this->normalizer
    ->normalize($this->typedData));
}

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