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

testObjectPropertyEntity() public method

    public function testObjectPropertyEntity()
    {
        $key = new Key('foo', ['path' => [['kind' => 'kind', 'id' => 'id']]]);
        $entity = new Entity($key, ['key' => 'val']);
        $res = $this->mapper->objectProperty($entity);
        $this->assertEquals('val', $res['entityValue']['properties']['key']['stringValue']);
    }