Neos\Flow\Tests\Unit\Mvc\View\JsonViewTest::objectIdentifierExposureTestData PHP Метод

objectIdentifierExposureTestData() публичный Метод

data provider for testTransformValueWithObjectIdentifierExposure()
public objectIdentifierExposureTestData ( ) : array
Результат array
    public function objectIdentifierExposureTestData()
    {
        $output = [];
        $dummyIdentifier = 'e4f40dfc-8c6e-4414-a5b1-6fd3c5cf7a53';
        $object = new \stdClass();
        $object->value1 = new \stdClass();
        $configuration = ['_descend' => ['value1' => ['_exposeObjectIdentifier' => true]]];
        $expected = ['value1' => ['__identity' => $dummyIdentifier]];
        $output[] = [$object, $configuration, $expected, $dummyIdentifier, 'boolean TRUE should result in __identity key'];
        $configuration['_descend']['value1']['_exposedObjectIdentifierKey'] = 'guid';
        $expected = ['value1' => ['guid' => $dummyIdentifier]];
        $output[] = [$object, $configuration, $expected, $dummyIdentifier, 'string value should result in string-equal key'];
        return $output;
    }