/** * Check min and max rental period * * @param string $_testId * @param int $product_id * @test * @loadFixture * @loadExpectation * @dataProvider dataProvider */ public function checkMinMax($_testId, $product_id) { $product = Mage::getModel('catalog/product')->load($product_id); $_expected = $this->expected('testId' . $_testId); list($_minRentalNumber, $_minRentalType, $_maxRentalNumber, $_maxRentalType) = ITwebexperts_Payperrentals_Helper_Data::getMinMaxRental($product); $_minRentalPeriod = ITwebexperts_Payperrentals_Helper_Data::getPeriodInSeconds($_minRentalNumber, $_minRentalType); $_maxRentalPeriod = ITwebexperts_Payperrentals_Helper_Data::getPeriodInSeconds($_maxRentalNumber, $_maxRentalType); $this->assertEquals($_expected->getMin(), $_minRentalPeriod); $this->assertEquals($_expected->getMax(), $_maxRentalPeriod); }