diff --git a/core/lib/Thelia/Coupon/CouponAbstract.php b/core/lib/Thelia/Coupon/CouponAbstract.php new file mode 100644 index 000000000..8c78dd924 --- /dev/null +++ b/core/lib/Thelia/Coupon/CouponAbstract.php @@ -0,0 +1,115 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * Assist in writing a CouponInterface + * + * @package Coupon + * @author Guillaume MOREL + * + */ +abstract class CouponAbstract implements CouponInterface +{ + /** @var RuleOrganizerInterface */ + protected $organizer = null; + + + /** + * Return Coupon code (ex: XMAS) + * + * @return string + */ + public function getCode() + { + // TODO: Implement getCode() method. + } + + /** + * Return Coupon title (ex: Coupon for XMAS) + * + * @return string + */ + public function getTitle() + { + // TODO: Implement getTitle() method. + } + + /** + * Return Coupon short description + * + * @return string + */ + public function getShortDescription() + { + // TODO: Implement getShortDescription() method. + } + + /** + * Return Coupon description + * + * @return string + */ + public function getDescription() + { + // TODO: Implement getDescription() method. + } + + /** + * If Coupon is cumulative or prevent any accumulation + * If is cumulative you can sum Coupon effects + * If not cancel all other Coupon and take the last given + * + * @return string + */ + public function isCumulative() + { + // TODO: Implement isCumulative() method. + } + + /** + * If Coupon is removing Checkout Postage + * + * @return bool + */ + public function isRemovingPostage() + { + // TODO: Implement isRemovingPostage() method. + } + + /** + * Return effects generated by the coupon + * + * @return \Closure + */ + public function getEffect() + { + // TODO: Implement getEffect() method. + } + +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/CouponAdapterInterface.php b/core/lib/Thelia/Coupon/CouponAdapterInterface.php new file mode 100644 index 000000000..ece82fe28 --- /dev/null +++ b/core/lib/Thelia/Coupon/CouponAdapterInterface.php @@ -0,0 +1,60 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * Allow a CouponManager class to be fed with relevant Thelia data + * + * @package Coupon + * @author Guillaume MOREL + * + */ +interface CouponAdapterInterface +{ + + /** + * Return a Cart a CouponManager can process + * + * @return \Thelia\Model\Cart + */ + public function getCart(); + + /** + * Return an Address a CouponManager can process + * + * @return \Thelia\Model\Address + */ + public function getDeliveryAddress(); + + /** + * Return an Customer a CouponManager can process + * + * @return \Thelia\Model\Customer + */ + public function getCustomer(); +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/CouponBaseAdapter.php b/core/lib/Thelia/Coupon/CouponBaseAdapter.php new file mode 100644 index 000000000..35b15af41 --- /dev/null +++ b/core/lib/Thelia/Coupon/CouponBaseAdapter.php @@ -0,0 +1,67 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class CouponBaseAdapter implements CouponAdapterInterface +{ + /** + * Return a Cart a CouponManager can process + * + * @return \Thelia\Model\Cart + */ + public function getCart() + { + // TODO: Implement getCart() method. + } + + /** + * Return an Address a CouponManager can process + * + * @return \Thelia\Model\Address + */ + public function getDeliveryAddress() + { + // TODO: Implement getDeliveryAddress() method. + } + + /** + * Return an Customer a CouponManager can process + * + * @return \Thelia\Model\Customer + */ + public function getCustomer() + { + // TODO: Implement getCustomer() method. + } + +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/CouponFactory.php b/core/lib/Thelia/Coupon/CouponFactory.php new file mode 100644 index 000000000..f999eabff --- /dev/null +++ b/core/lib/Thelia/Coupon/CouponFactory.php @@ -0,0 +1,49 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * Generate a CouponInterface + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class CouponFactory +{ + /** + * Build a CouponInterface from its database data + * + * @param int $couponId CouponInterface id + * + * @return CouponInterface ready to be processed + */ + public function buildCouponFromId($couponId) + { + } +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/CouponInterface.php b/core/lib/Thelia/Coupon/CouponInterface.php new file mode 100644 index 000000000..ad332ad0a --- /dev/null +++ b/core/lib/Thelia/Coupon/CouponInterface.php @@ -0,0 +1,89 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * Represents a Coupon ready to be processed in a Checkout process + * + * @package Coupon + * @author Guillaume MOREL + * + */ +interface CouponInterface +{ + /** + * Return Coupon code (ex: XMAS) + * + * @return string + */ + public function getCode(); + + /** + * Return Coupon title (ex: Coupon for XMAS) + * + * @return string + */ + public function getTitle(); + + /** + * Return Coupon short description + * + * @return string + */ + public function getShortDescription(); + + /** + * Return Coupon description + * + * @return string + */ + public function getDescription(); + + /** + * If Coupon is cumulative or prevent any accumulation + * If is cumulative you can sum Coupon effects + * If not cancel all other Coupon and take the last given + * + * @return string + */ + public function isCumulative(); + + /** + * If Coupon is removing Checkout Postage + * + * @return bool + */ + public function isRemovingPostage(); + + /** + * Return effects generated by the coupon + * + * @return \Closure + */ + public function getEffect(); +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/CouponManager.php b/core/lib/Thelia/Coupon/CouponManager.php new file mode 100644 index 000000000..958f65db5 --- /dev/null +++ b/core/lib/Thelia/Coupon/CouponManager.php @@ -0,0 +1,54 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * Manage how Coupons could interact with a Checkout + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class CouponManager +{ + /** @var CouponAdapterInterface Provide necessary value from Thelia*/ + protected $adapter; + + /** @var array CouponInterface to process*/ + protected $coupons = array(); + + /** + * Get Discount for the given Coupons + * + * @return float checkout discount + */ + public function getDiscount() + { + return 10.00; + } +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/Rule/AvailableForDate.php b/core/lib/Thelia/Coupon/Rule/AvailableForDate.php new file mode 100644 index 000000000..f55c48973 --- /dev/null +++ b/core/lib/Thelia/Coupon/Rule/AvailableForDate.php @@ -0,0 +1,38 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon\Rule; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class AvailableForDate extends AvailableForPeriod +{ + +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/Rule/AvailableForLocationX.php b/core/lib/Thelia/Coupon/Rule/AvailableForLocationX.php new file mode 100644 index 000000000..c57702b2f --- /dev/null +++ b/core/lib/Thelia/Coupon/Rule/AvailableForLocationX.php @@ -0,0 +1,38 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon\Rule; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class AvailableForLocationX extends CouponRuleAbstract +{ + +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/Rule/AvailableForNbArticles.php b/core/lib/Thelia/Coupon/Rule/AvailableForNbArticles.php new file mode 100644 index 000000000..78bbb0e00 --- /dev/null +++ b/core/lib/Thelia/Coupon/Rule/AvailableForNbArticles.php @@ -0,0 +1,38 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon\Rule; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class AvailableForNbArticles extends CouponRuleAbstract +{ + +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/Rule/AvailableForPeriod.php b/core/lib/Thelia/Coupon/Rule/AvailableForPeriod.php new file mode 100644 index 000000000..1a2753dc4 --- /dev/null +++ b/core/lib/Thelia/Coupon/Rule/AvailableForPeriod.php @@ -0,0 +1,38 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon\Rule; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class AvailableForPeriod extends CouponRuleAbstract +{ + +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/Rule/AvailableForRepeatedDate.php b/core/lib/Thelia/Coupon/Rule/AvailableForRepeatedDate.php new file mode 100644 index 000000000..7d03a1c5b --- /dev/null +++ b/core/lib/Thelia/Coupon/Rule/AvailableForRepeatedDate.php @@ -0,0 +1,38 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon\Rule; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class AvailableForRepeatedDate extends AvailableForDate +{ + +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/Rule/AvailableForRepeatedPeriod.php b/core/lib/Thelia/Coupon/Rule/AvailableForRepeatedPeriod.php new file mode 100644 index 000000000..8552947c2 --- /dev/null +++ b/core/lib/Thelia/Coupon/Rule/AvailableForRepeatedPeriod.php @@ -0,0 +1,38 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon\Rule; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class AvailableForRepeatedPeriod extends AvailableForPeriod +{ + +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/Rule/AvailableForTotalAmount.php b/core/lib/Thelia/Coupon/Rule/AvailableForTotalAmount.php new file mode 100644 index 000000000..b90ef1da5 --- /dev/null +++ b/core/lib/Thelia/Coupon/Rule/AvailableForTotalAmount.php @@ -0,0 +1,38 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon\Rule; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class AvailableForTotalAmount extends CouponRuleAbstract +{ + +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/Rule/AvailableForTotalAmountForCategoryY.php b/core/lib/Thelia/Coupon/Rule/AvailableForTotalAmountForCategoryY.php new file mode 100644 index 000000000..08bdc23e5 --- /dev/null +++ b/core/lib/Thelia/Coupon/Rule/AvailableForTotalAmountForCategoryY.php @@ -0,0 +1,38 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon\Rule; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class AvailableForTotalAmountForCategoryY extends AvailableForTotalAmount +{ + +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/Rule/CouponRuleAbstract.php b/core/lib/Thelia/Coupon/Rule/CouponRuleAbstract.php new file mode 100644 index 000000000..1c30f0321 --- /dev/null +++ b/core/lib/Thelia/Coupon/Rule/CouponRuleAbstract.php @@ -0,0 +1,69 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon\Rule; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * Assist in writing a condition of whether the Rule is applied or not + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class CouponRuleAbstract implements CuponRuleInterface +{ + /** + * Check if backoffice inputs are relevant or not + * + * @return bool + */ + public function checkBackOfficeIntput() + { + // TODO: Implement checkBackOfficeIntput() method. + } + + /** + * Check if Checkout inputs are relevant or not + * + * @return bool + */ + public function checkCheckoutInput() + { + // TODO: Implement checkCheckoutInput() method. + } + + /** + * Check if the current Checkout matchs this condition + * + * @return bool + */ + public function isMatching() + { + // TODO: Implement isMatching() method. + } + +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/Rule/CuponRuleInterface.php b/core/lib/Thelia/Coupon/Rule/CuponRuleInterface.php new file mode 100644 index 000000000..b0cbfa767 --- /dev/null +++ b/core/lib/Thelia/Coupon/Rule/CuponRuleInterface.php @@ -0,0 +1,60 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon\Rule; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * Represents a condition of whether the Rule is applied or not + * + * @package Coupon + * @author Guillaume MOREL + * + */ +interface CuponRuleInterface +{ + /** + * Check if backoffice inputs are relevant or not + * + * @return bool + */ + public function checkBackOfficeIntput(); + + /** + * Check if Checkout inputs are relevant or not + * + * @return bool + */ + public function checkCheckoutInput(); + + /** + * Check if the current Checkout matchs this condition + * + * @return bool + */ + public function isMatching(); + +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/RuleOrganizer.php b/core/lib/Thelia/Coupon/RuleOrganizer.php new file mode 100644 index 000000000..b3699fc6c --- /dev/null +++ b/core/lib/Thelia/Coupon/RuleOrganizer.php @@ -0,0 +1,51 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * Manage how Coupons could interact with a Checkout + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class RuleOrganizer implements RuleOrganizerInterface +{ + /** + * Organize CouponRuleInterface + * + * @param array $rules Array of CouponRuleInterface + * + * @return array Array of CouponRuleInterface sorted + */ + public function organize(array $rules) + { + // TODO: Implement organize() method. + } + +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/RuleOrganizerInterface.php b/core/lib/Thelia/Coupon/RuleOrganizerInterface.php new file mode 100644 index 000000000..bc901d24c --- /dev/null +++ b/core/lib/Thelia/Coupon/RuleOrganizerInterface.php @@ -0,0 +1,47 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * Manage how Coupons could interact with a Checkout + * + * @package Coupon + * @author Guillaume MOREL + * + */ +interface RuleOrganizerInterface +{ + /** + * Organize CouponRuleInterface + * + * @param array $rules Array of CouponRuleInterface + * + * @return array Array of CouponRuleInterface sorted + */ + public function organize(array $rules); +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/Type/RemoveXAmount.php b/core/lib/Thelia/Coupon/Type/RemoveXAmount.php new file mode 100644 index 000000000..1119d4ac2 --- /dev/null +++ b/core/lib/Thelia/Coupon/Type/RemoveXAmount.php @@ -0,0 +1,40 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon\Type; + +use Thelia\Coupon\CouponAbstract; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class RemoveXAmount extends CouponAbstract +{ + +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/Type/RemoveXAmountForCategoryY.php b/core/lib/Thelia/Coupon/Type/RemoveXAmountForCategoryY.php new file mode 100644 index 000000000..2cd8e5db6 --- /dev/null +++ b/core/lib/Thelia/Coupon/Type/RemoveXAmountForCategoryY.php @@ -0,0 +1,38 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon\Type; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class RemoveXAmountForCategoryY extends RemoveXAmount +{ + +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/Type/RemoveXPercent.php b/core/lib/Thelia/Coupon/Type/RemoveXPercent.php new file mode 100644 index 000000000..638861e71 --- /dev/null +++ b/core/lib/Thelia/Coupon/Type/RemoveXPercent.php @@ -0,0 +1,38 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon\Type; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class RemoveXPercent extends CouponAbstract +{ + +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/Type/RemoveXPercentForAttributeY.php b/core/lib/Thelia/Coupon/Type/RemoveXPercentForAttributeY.php new file mode 100644 index 000000000..643016c93 --- /dev/null +++ b/core/lib/Thelia/Coupon/Type/RemoveXPercentForAttributeY.php @@ -0,0 +1,38 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon\Type; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class RemoveXPercentForAttributeY extends RemoveXPercent +{ + +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/Type/RemoveXPercentForCategoryY.php b/core/lib/Thelia/Coupon/Type/RemoveXPercentForCategoryY.php new file mode 100644 index 000000000..6ad0d21df --- /dev/null +++ b/core/lib/Thelia/Coupon/Type/RemoveXPercentForCategoryY.php @@ -0,0 +1,38 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon\Type; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class RemoveXPercentForCategoryY extends RemoveXPercent +{ + +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/Type/RemoveXPercentForProductSaleElementIdY.php b/core/lib/Thelia/Coupon/Type/RemoveXPercentForProductSaleElementIdY.php new file mode 100644 index 000000000..b19913617 --- /dev/null +++ b/core/lib/Thelia/Coupon/Type/RemoveXPercentForProductSaleElementIdY.php @@ -0,0 +1,38 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon\Type; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class RemoveXPercentForProductSaleElementIdY extends RemoveXPercent +{ + +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/Type/RemoveXPercentForProductY.php b/core/lib/Thelia/Coupon/Type/RemoveXPercentForProductY.php new file mode 100644 index 000000000..494e30fcd --- /dev/null +++ b/core/lib/Thelia/Coupon/Type/RemoveXPercentForProductY.php @@ -0,0 +1,38 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Coupon\Type; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class RemoveXPercentForProductY extends RemoveXPercent +{ + +} \ No newline at end of file diff --git a/core/lib/Thelia/Tests/Coupon/CouponBaseAdapterTest.php b/core/lib/Thelia/Tests/Coupon/CouponBaseAdapterTest.php new file mode 100644 index 000000000..57d0ce131 --- /dev/null +++ b/core/lib/Thelia/Tests/Coupon/CouponBaseAdapterTest.php @@ -0,0 +1,66 @@ +object = new CouponBaseAdapter; + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers Thelia\Coupon\CouponBaseAdapter::getCart + * @todo Implement testGetCart(). + */ + public function testGetCart() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\CouponBaseAdapter::getDeliveryAddress + * @todo Implement testGetDeliveryAddress(). + */ + public function testGetDeliveryAddress() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\CouponBaseAdapter::getCustomer + * @todo Implement testGetCustomer(). + */ + public function testGetCustomer() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } +} diff --git a/core/lib/Thelia/Tests/Coupon/CouponFactoryTest.php b/core/lib/Thelia/Tests/Coupon/CouponFactoryTest.php new file mode 100644 index 000000000..9a637b299 --- /dev/null +++ b/core/lib/Thelia/Tests/Coupon/CouponFactoryTest.php @@ -0,0 +1,42 @@ +object = new CouponFactory; + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers Thelia\Coupon\CouponFactory::buildCouponFromId + * @todo Implement testBuildCouponFromId(). + */ + public function testBuildCouponFromId() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } +} diff --git a/core/lib/Thelia/Tests/Coupon/CouponManagerTest.php b/core/lib/Thelia/Tests/Coupon/CouponManagerTest.php new file mode 100644 index 000000000..55b48f4d9 --- /dev/null +++ b/core/lib/Thelia/Tests/Coupon/CouponManagerTest.php @@ -0,0 +1,42 @@ +object = new CouponManager; + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers Thelia\Coupon\CouponManager::getDiscount + * @todo Implement testGetDiscount(). + */ + public function testGetDiscount() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } +} diff --git a/core/lib/Thelia/Tests/Coupon/Rule/AvailableForNbArticlesTest.php b/core/lib/Thelia/Tests/Coupon/Rule/AvailableForNbArticlesTest.php new file mode 100644 index 000000000..ed8a57833 --- /dev/null +++ b/core/lib/Thelia/Tests/Coupon/Rule/AvailableForNbArticlesTest.php @@ -0,0 +1,26 @@ +object = new RuleOrganizer; + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers Thelia\Coupon\RuleOrganizer::organize + * @todo Implement testOrganize(). + */ + public function testOrganize() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } +} diff --git a/core/lib/Thelia/Tests/Coupon/Type/RemoveXAmountForCategoryYTest.php b/core/lib/Thelia/Tests/Coupon/Type/RemoveXAmountForCategoryYTest.php new file mode 100644 index 000000000..ed8a57833 --- /dev/null +++ b/core/lib/Thelia/Tests/Coupon/Type/RemoveXAmountForCategoryYTest.php @@ -0,0 +1,26 @@ +