/** * A method to test the deliveryBlocked() method. * * Tests that the method in the class returns a PEAR::Error, as method is abstract. */ function testDeliveryBlocked() { $oCommon = new OA_Maintenance_Priority_DeliveryLimitation_Common(array()); PEAR::pushErrorHandling(null); $this->assertTrue($oCommon->deliveryBlocked(new Date()) instanceof PEAR_Error); PEAR::popErrorHandling(); }
/** * A method to test the deliveryBlocked() method. * * Tests that the method in the class returns a PEAR::Error, as method is abstract. */ function testDeliveryBlocked() { $oDate = new Date(); PEAR::pushErrorHandling(null); $this->assertTrue(is_a(OA_Maintenance_Priority_DeliveryLimitation_Common::deliveryBlocked($oDate), 'pear_error')); PEAR::popErrorHandling(); }
/** * Constructor method. * * @param array $aDeliveryLimitation An array containing the details of a delivery limitation * associated with an ad. For example: * array( * [ad_id] => 1 * [logical] => and * [type] => Time:Hour * [comparison] => == * [data] => 1,7,18,23 * [executionorder] => 1 * ) * @return OA_Maintenance_Priority_DeliveryLimitation_Date */ function OA_Maintenance_Priority_DeliveryLimitation_Date($aDeliveryLimitation) { parent::OA_Maintenance_Priority_DeliveryLimitation_Common($aDeliveryLimitation); $this->date = new Date($this->data[0]); }
/** * Constructor method. * * @param array $aDeliveryLimitation An array containing the details of a delivery limitation * associated with an ad. For example: * array( * [ad_id] => 1 * [logical] => and * [type] => Time:Hour * [comparison] => =~ * [data] => 1,7,18,23 * [executionorder] => 1 * ) * @return OA_Maintenance_Priority_DeliveryLimitation_Day */ function OA_Maintenance_Priority_DeliveryLimitation_Day($aDeliveryLimitation) { parent::OA_Maintenance_Priority_DeliveryLimitation_Common($aDeliveryLimitation); }