/** * @test */ public function makeControllerRedirectToTwoSubgroupsMethod() { $this->mockObjects(); $this->controller = null; $this->controller = new DatacenterController($this->dataCenterService, $this->statistic, $this->jsonResponse, $this->grouper, $this->builderFactory); $this->controller->getValuesAsJson(); $map = new HashMap(); $map->put(0, $this->listValues()); $map->put(1, $this->listFilteredByOtherSubgroup()); $this->dataCenterService->expects($this->any())->method('getValuesFilteringWithMultipleParams')->will($this->returnValue($map)); $subgroup = $font = $type = $variety = $origin = $destiny = 1; $variety = array(1, 2, 3); $type = array(1, 2); $destiny = array(6, 7, 8, 9); $subgroup = array(1, 2); $dataParam = new DataParam($subgroup, $font, $type, $variety, $origin, $destiny); $this->assertEquals($this->twoSubgroupsJsonExepcted(), $this->controller->getValues($dataParam, array(1, 2))); }