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

testHasAncestor() public method

public testHasAncestor ( )
    public function testHasAncestor()
    {
        $snippet = $this->snippetFromMethod(Query::class, 'hasAncestor');
        $snippet->addLocal('datastore', $this->datastore);
        $snippet->addLocal('query', $this->query);
        $snippet->invoke();
        $this->assertEquals('__key__', $this->query->queryObject()['filter']['compositeFilter']['filters'][0]['propertyFilter']['property']['name']);
    }