Google\Cloud\Tests\Snippets\Datastore\Query\QueryTest::testKeysOnly PHP Method

testKeysOnly() public method

public testKeysOnly ( )
    public function testKeysOnly()
    {
        $snippet = $this->snippetFromMethod(Query::class, 'keysOnly');
        $snippet->addLocal('query', $this->query);
        $res = $snippet->invoke();
        $this->assertEquals([['property' => $this->propertyName('__key__')]], $this->query->queryObject()['projection']);
    }