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

testObjectToRequestWithMeaning() public method

    public function testObjectToRequestWithMeaning()
    {
        $key = new Key('project', ['path' => [['kind' => 'Kind', 'name' => 'Name']]]);
        $e = new Entity($key, ['foo' => 'bar'], ['meanings' => ['foo' => 10]]);
        $res = $this->mapper->objectToRequest($e);
        $this->assertEquals('bar', $res['properties']['foo']['stringValue']);
        $this->assertEquals(10, $res['properties']['foo']['meaning']);
    }