Exemplo n.º 1
0
 public function testBuild()
 {
     $this->query->setColumns(array('m_visits', 'm_page_loads'));
     $this->query->setSpace('475905');
     $this->query->setStartDate($startDate = new \DateTime('2015-08-02'));
     $this->query->setEndDate($endDate = new \DateTime('2015-08-02'));
     $this->query->setMaxResults(10000);
     $this->query->setPageNum(1);
     $this->query->setLng('fr');
     $expected = "https://apirest.atinternet-solutions.com/data/v2/json/getData?columns=%7Bm_visits%2Cm_page_loads%7D&space=%7Bs%3A475905%7D&period=%7BD%3A%7Bstart%3A%272015-08-02%27%2Cend%3A%272015-08-02%27%7D%7D&max-results=10000&page-num=1&include=%7Btotal%3Adisplayed%7D&lng=fr";
     $this->assertSame($expected, $this->query->build());
 }