You are here

protected function TimestampItemNormalizerTest::createTimestampItemProphecy in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/serialization/tests/src/Unit/Normalizer/TimestampItemNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\TimestampItemNormalizerTest::createTimestampItemProphecy()
  2. 10 core/modules/serialization/tests/src/Unit/Normalizer/TimestampItemNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\TimestampItemNormalizerTest::createTimestampItemProphecy()

Creates a TimestampItem prophecy.

Return value

\Prophecy\Prophecy\ObjectProphecy|\Drupal\Core\Field\Plugin\Field\FieldType\TimestampItem

4 calls to TimestampItemNormalizerTest::createTimestampItemProphecy()
TimestampItemNormalizerTest::testDenormalize in core/modules/serialization/tests/src/Unit/Normalizer/TimestampItemNormalizerTest.php
@covers ::denormalize
TimestampItemNormalizerTest::testNormalize in core/modules/serialization/tests/src/Unit/Normalizer/TimestampItemNormalizerTest.php
@covers ::normalize
TimestampItemNormalizerTest::testSupportsDenormalization in core/modules/serialization/tests/src/Unit/Normalizer/TimestampItemNormalizerTest.php
@covers ::supportsDenormalization
TimestampItemNormalizerTest::testSupportsNormalization in core/modules/serialization/tests/src/Unit/Normalizer/TimestampItemNormalizerTest.php
@covers ::supportsNormalization

File

core/modules/serialization/tests/src/Unit/Normalizer/TimestampItemNormalizerTest.php, line 174

Class

TimestampItemNormalizerTest
Tests that TimestampItem (de)normalization uses Timestamp (de)normalization.

Namespace

Drupal\Tests\serialization\Unit\Normalizer

Code

protected function createTimestampItemProphecy() {
  $timestamp_item = $this
    ->prophesize(TimestampItem::class);
  $timestamp_item
    ->getParent()
    ->willReturn(TRUE);
  return $timestamp_item;
}