function TimestampItemNormalizerTest::createTimestampItemProphecy

Same name and namespace in other branches
  1. 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

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.