Google\Cloud\Tests\Datastore\OperationTest::testLookupWithoutSort PHP Method

testLookupWithoutSort() public method

    public function testLookupWithoutSort()
    {
        $data = json_decode(file_get_contents(__DIR__ . '/../fixtures/datastore/entity-lookup-bigsort.json'), true);
        $keys = [];
        foreach ($data['keys'] as $key) {
            $keys[] = new Key('test-project', ['path' => $key['path']]);
        }
        $this->connection->lookup(Argument::any())->willReturn(['found' => $data['entities'], 'missing' => $data['missing']]);
        $this->operation->setConnection($this->connection->reveal());
        $res = $this->operation->lookup($keys);
        $found = $res['found'];
        foreach ($data['entities'] as $i => $e) {
            $this->assertEquals($e['entity']['key']['path'][0]['id'], $found[$i]->key()->path()[0]['id']);
        }
    }