public function FieldNormalizerValueTest::rasterizeValueProvider in JSON:API 8
Data provider for testRasterizeValue.
File
- tests/
src/ Unit/ Normalizer/ Value/ FieldNormalizerValueTest.php, line 59
Class
- FieldNormalizerValueTest
- @coversDefaultClass \Drupal\jsonapi\Normalizer\Value\FieldNormalizerValue @group jsonapi
Namespace
Drupal\Tests\jsonapi\Unit\Normalizer\ValueCode
public function rasterizeValueProvider() {
$uuid_raw = '4ae99eec-8b0e-41f7-9400-fbd65c174902';
$uuid_value = $this
->prophesize(FieldItemNormalizerValue::class);
$uuid_value
->rasterizeValue()
->willReturn('4ae99eec-8b0e-41f7-9400-fbd65c174902');
$uuid_value
->getCacheContexts()
->willReturn([
'ccfoo',
]);
$uuid_value
->getCacheTags()
->willReturn([
'ctfoo',
]);
$uuid_value
->getCacheMaxAge()
->willReturn(15);
return [
[
[
$uuid_value
->reveal(),
],
1,
$uuid_raw,
],
[
[
$uuid_value
->reveal(),
$uuid_value
->reveal(),
],
-1,
[
$uuid_raw,
$uuid_raw,
],
],
];
}