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

testHasAncestorWithType() public method

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