/** * Method to test the getZonesAllocationsByAgency method. * * Requirements: * Test 1: Test with no data, and ensure no data returned. * Test 2: Test with sample data, and ensure the correct data is returned. */ function testGetZonesAllocationsForEcpmRemnantByAgency() { $oMaxDalMaintenance = new OA_Dal_Maintenance_Priority(); list($agencyId1, $agencyId2) = $this->_generateData(DataObjects_Campaigns::PRIORITY_ECPM); // Test 1 $result = $oMaxDalMaintenance->getZonesAllocationsForEcpmRemnantByAgency($agencyId2); $this->assertEqual(0, count($result)); // Test 2 $aResult = $oMaxDalMaintenance->getZonesAllocationsForEcpmRemnantByAgency($agencyId1); $this->assertEqual(1, count($aResult)); $this->assertEqual(2, $aResult[$this->idZone1]); TestEnv::restoreEnv(); }