function TimestampItemNormalizerTest::createTimestampItemProphecy

Same name in other branches
  1. 8.9.x 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()
  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
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;
}

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