You are here

protected function CopyTest::getTamperItem in Tamper 8

Get a tamper item to use in the test.

Return value

\Drupal\tamper\TamperItem The tamperable item to use in the test.

2 calls to CopyTest::getTamperItem()
CopyTest::testCopyFrom in tests/src/Unit/Plugin/Tamper/CopyTest.php
Test copy from.
CopyTest::testCopyTo in tests/src/Unit/Plugin/Tamper/CopyTest.php
Test copy to.

File

tests/src/Unit/Plugin/Tamper/CopyTest.php, line 29

Class

CopyTest
Tests the copy plugin.

Namespace

Drupal\Tests\tamper\Unit\Plugin\Tamper

Code

protected function getTamperItem() {
  $item = new TamperItem();
  $item
    ->setSourceProperty('title', 'Robots are cool.');
  $item
    ->setSourceProperty('body', 'Robots are scary!');
  return $item;
}