public function testBuildMultiId() { $query = new Query(); $query->addId(123)->addId(456); $builder = new RequestBuilder(); $request = $builder->build($query); $this->assertEquals($request::METHOD_GET, $request->getMethod()); $this->assertEquals('get?omitHeader=true&wt=json&json.nl=flat&ids=123,456', urldecode($request->getUri())); }
public function testSetIds() { $this->query->clearIds(); $this->query->addIds(array('id1', 'id2')); $this->query->setIds(array('id3', 'id4')); $this->assertEquals(array('id3', 'id4'), $this->query->getIds()); }