function TimestampItemNormalizerTest::createTimestampItemProphecy

Same name and namespace in other branches
  1. 9 core/modules/serialization/tests/src/Unit/Normalizer/TimestampItemNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\TimestampItemNormalizerTest::createTimestampItemProphecy()
  2. 8.9.x core/modules/serialization/tests/src/Unit/Normalizer/TimestampItemNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\TimestampItemNormalizerTest::createTimestampItemProphecy()
  3. 11.x 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[[api-linebreak]]
TimestampItemNormalizerTest::testNormalize in core/modules/serialization/tests/src/Unit/Normalizer/TimestampItemNormalizerTest.php
@covers ::normalize[[api-linebreak]]
TimestampItemNormalizerTest::testSupportsDenormalization in core/modules/serialization/tests/src/Unit/Normalizer/TimestampItemNormalizerTest.php
@covers ::supportsDenormalization[[api-linebreak]]
TimestampItemNormalizerTest::testSupportsNormalization in core/modules/serialization/tests/src/Unit/Normalizer/TimestampItemNormalizerTest.php
@covers ::supportsNormalization[[api-linebreak]]

File

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

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;
}

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