public function testBuild() { $this->query->setSerial('serial'); $this->query->setStartDate($startDate = new \DateTime('2015-08-02')); $this->query->setEndDate($endDate = new \DateTime('2015-08-02')); $this->query->setIndicator('INDICATOR'); $expected = ['{"gosuRequest":{"tokenId":"token","page":1,"pageSize":10000,"startDate":"2015-08-02","endDate":"2015-08-02","indicator":"INDICATOR","serial":"serial","periodType":"D","top":{"unit":"LECTURES","order":"DESC"}}}']; $this->assertSame($expected, $this->query->build('token')); }