Google\Cloud\Tests\Datastore\EntityMapperTest::testResponseToPropertiesKeyValue PHP Method

testResponseToPropertiesKeyValue() public method

    public function testResponseToPropertiesKeyValue()
    {
        $path = [['kind' => 'Kind', 'name' => 'Name']];
        $data = ['foo' => ['keyValue' => (new Key('foo', ['path' => $path]))->keyObject()]];
        $res = $this->mapper->responseToEntityProperties($data)['properties'];
        $this->assertInstanceOf(Key::class, $res['foo']);
        $this->assertEquals($path, $res['foo']->path());
    }