3 namespace Drupal\Tests\hal\Unit;
5 use Drupal\Tests\UnitTestCase;
8 * Common ancestor for FieldItemNormalizerDenormalizeExceptionsUnitTest and
9 * FieldNormalizerDenormalizeExceptionsUnitTest as they have the same
12 abstract class NormalizerDenormalizeExceptionsUnitTestBase extends UnitTestCase {
15 * Provides data for FieldItemNormalizerDenormalizeExceptionsUnitTest::testFieldItemNormalizerDenormalizeExceptions()
16 * and for FieldNormalizerDenormalizeExceptionsUnitTest::testFieldNormalizerDenormalizeExceptions().
18 * @return array Test data.
20 public function providerNormalizerDenormalizeExceptions() {
21 $mock = $this->getMock('\Drupal\Core\Field\Plugin\DataType\FieldItem', ['getParent']);
22 $mock->expects($this->any())
24 ->will($this->returnValue(NULL));
27 [['target_instance' => $mock]],