diff --git a/core/lib/Thelia/Coupon/ConditionCollection.php b/core/lib/Thelia/Condition/ConditionCollection.php similarity index 99% rename from core/lib/Thelia/Coupon/ConditionCollection.php rename to core/lib/Thelia/Condition/ConditionCollection.php index f9513160b..47f184cdf 100644 --- a/core/lib/Thelia/Coupon/ConditionCollection.php +++ b/core/lib/Thelia/Condition/ConditionCollection.php @@ -21,7 +21,7 @@ /* */ /**********************************************************************************/ -namespace Thelia\Coupon; +namespace Thelia\Condition; use Symfony\Component\DependencyInjection\ContainerInterface; use Thelia\Condition\ConditionManagerInterface; diff --git a/core/lib/Thelia/Condition/ConditionEvaluator.php b/core/lib/Thelia/Condition/ConditionEvaluator.php index 327c80a3d..768054a26 100644 --- a/core/lib/Thelia/Condition/ConditionEvaluator.php +++ b/core/lib/Thelia/Condition/ConditionEvaluator.php @@ -25,7 +25,7 @@ namespace Thelia\Condition; use Symfony\Component\DependencyInjection\ContainerInterface; use Thelia\Condition\Operators; -use Thelia\Coupon\ConditionCollection; +use Thelia\Condition\ConditionCollection; /** diff --git a/core/lib/Thelia/Condition/ConditionFactory.php b/core/lib/Thelia/Condition/ConditionFactory.php index 3e1c771ee..06c2a0ea8 100644 --- a/core/lib/Thelia/Condition/ConditionFactory.php +++ b/core/lib/Thelia/Condition/ConditionFactory.php @@ -25,7 +25,7 @@ namespace Thelia\Condition; use Symfony\Component\DependencyInjection\ContainerInterface; use Thelia\Coupon\FacadeInterface; -use Thelia\Coupon\ConditionCollection; +use Thelia\Condition\ConditionCollection; /** diff --git a/core/lib/Thelia/Coupon/RuleOrganizer.php b/core/lib/Thelia/Condition/ConditionOrganizer.php similarity index 93% rename from core/lib/Thelia/Coupon/RuleOrganizer.php rename to core/lib/Thelia/Condition/ConditionOrganizer.php index 673f27404..116203e5b 100644 --- a/core/lib/Thelia/Coupon/RuleOrganizer.php +++ b/core/lib/Thelia/Condition/ConditionOrganizer.php @@ -21,20 +21,20 @@ /* */ /**********************************************************************************/ -namespace Thelia\Coupon; +namespace Thelia\Condition; /** * Created by JetBrains PhpStorm. * Date: 8/19/13 * Time: 3:24 PM * - * Manage how Coupons could interact with a Checkout + * Manage how Condition could interact with each others * * @package Condition * @author Guillaume MOREL * */ -class RuleOrganizer implements RuleOrganizerInterface +class ConditionOrganizer implements ConditionOrganizerInterface { /** * Organize ConditionManagerInterface diff --git a/core/lib/Thelia/Coupon/RuleOrganizerInterface.php b/core/lib/Thelia/Condition/ConditionOrganizerInterface.php similarity index 94% rename from core/lib/Thelia/Coupon/RuleOrganizerInterface.php rename to core/lib/Thelia/Condition/ConditionOrganizerInterface.php index 93dd12ee9..5e30f8596 100644 --- a/core/lib/Thelia/Coupon/RuleOrganizerInterface.php +++ b/core/lib/Thelia/Condition/ConditionOrganizerInterface.php @@ -21,20 +21,20 @@ /* */ /**********************************************************************************/ -namespace Thelia\Coupon; +namespace Thelia\Condition; /** * Created by JetBrains PhpStorm. * Date: 8/19/13 * Time: 3:24 PM * - * Manage how Condition could interact with a Checkout + * Manage how Condition could interact with each other * * @package Condition * @author Guillaume MOREL * */ -interface RuleOrganizerInterface +interface ConditionOrganizerInterface { /** * Organize ConditionManagerInterface diff --git a/core/lib/Thelia/Condition/ConditionOrganizerTest.php b/core/lib/Thelia/Condition/ConditionOrganizerTest.php new file mode 100644 index 000000000..521482083 --- /dev/null +++ b/core/lib/Thelia/Condition/ConditionOrganizerTest.php @@ -0,0 +1,74 @@ +. */ +/* */ +/**********************************************************************************/ + +namespace Thelia\Coupon; +use Thelia\Condition\ConditionOrganizer; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * Unit Test ConditionOrganizer Class + * Generated by PHPUnit_SkeletonGenerator 1.2.1 on 2013-11-17 at 18:59:24. + * + * @package Condition + * @author Guillaume MOREL + * + */ +class ConditionOrganizerTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var ConditionOrganizer + */ + protected $object; + + /** + * Sets up the fixture, for example, opens a network connection. + * This method is called before a test is executed. + */ + protected function setUp() + { + $this->object = new ConditionOrganizer; + } + + /** + * 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/Condition/Implementation/MatchForTotalAmountManager.php b/core/lib/Thelia/Condition/Implementation/MatchForTotalAmountManager.php index 38b02abc4..a3ba846fa 100644 --- a/core/lib/Thelia/Condition/Implementation/MatchForTotalAmountManager.php +++ b/core/lib/Thelia/Condition/Implementation/MatchForTotalAmountManager.php @@ -146,15 +146,6 @@ class MatchForTotalAmountManager extends ConditionManagerAbstract */ public function isMatching() { - $isOperator1Legit = $this->isOperatorLegit( - $this->operators[self::INPUT1], - $this->availableOperators[self::INPUT1] - ); - $isOperator2Legit = $this->isOperatorLegit( - $this->operators[self::INPUT2], - $this->availableOperators[self::INPUT2] - ); - $condition1 = $this->conditionValidator->variableOpComparison( $this->facade->getCartTotalPrice(), $this->operators[self::INPUT1], diff --git a/core/lib/Thelia/Coupon/Type/CouponAbstract.php b/core/lib/Thelia/Coupon/Type/CouponAbstract.php index d3107faa7..8d7794956 100644 --- a/core/lib/Thelia/Coupon/Type/CouponAbstract.php +++ b/core/lib/Thelia/Coupon/Type/CouponAbstract.php @@ -27,8 +27,8 @@ use Symfony\Component\Intl\Exception\NotImplementedException; use Thelia\Condition\ConditionEvaluator; use Thelia\Core\Translation\Translator; use Thelia\Coupon\FacadeInterface; -use Thelia\Coupon\ConditionCollection; -use Thelia\Coupon\RuleOrganizerInterface; +use Thelia\Condition\ConditionCollection; +use Thelia\Condition\ConditionOrganizerInterface; use Thelia\Exception\InvalidConditionException; /** @@ -50,7 +50,7 @@ abstract class CouponAbstract implements CouponInterface /** @var Translator Service Translator */ protected $translator = null; - /** @var RuleOrganizerInterface */ + /** @var ConditionOrganizerInterface */ protected $organizer = null; /** @var ConditionCollection Array of ConditionManagerInterface */ @@ -116,7 +116,7 @@ abstract class CouponAbstract implements CouponInterface /** * Set Condition Organizer * - * @param RuleOrganizerInterface $organizer Manage Condition groups (&& and ||) + * @param ConditionOrganizerInterface $organizer Manage Condition groups (&& and ||) * * @return $this */ diff --git a/core/lib/Thelia/Coupon/Type/CouponInterface.php b/core/lib/Thelia/Coupon/Type/CouponInterface.php index b88039b5c..411446945 100644 --- a/core/lib/Thelia/Coupon/Type/CouponInterface.php +++ b/core/lib/Thelia/Coupon/Type/CouponInterface.php @@ -23,7 +23,7 @@ namespace Thelia\Coupon\Type; -use Thelia\Coupon\ConditionCollection; +use Thelia\Condition\ConditionCollection; /** * Created by JetBrains PhpStorm. diff --git a/core/lib/Thelia/Tests/Condition/ConditionCollectionTest.php b/core/lib/Thelia/Tests/Condition/ConditionCollectionTest.php new file mode 100644 index 000000000..a1ef64ce7 --- /dev/null +++ b/core/lib/Thelia/Tests/Condition/ConditionCollectionTest.php @@ -0,0 +1,109 @@ +. */ +/* */ +/**********************************************************************************/ + +namespace Thelia\Condition; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * Unit Test ConditionCollection Class + * Generated by PHPUnit_SkeletonGenerator 1.2.1 on 2013-11-17 at 18:59:24. + * + * @package Condition + * @author Guillaume MOREL + * + */ +class ConditionCollectionTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var ConditionCollection + */ + protected $object; + + /** + * Sets up the fixture, for example, opens a network connection. + * This method is called before a test is executed. + */ + protected function setUp() + { + $this->object = new ConditionCollection; + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers Thelia\Condition\ConditionCollection::getConditions + * @todo Implement testGetConditions(). + */ + public function testGetConditions() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Condition\ConditionCollection::add + * @todo Implement testAdd(). + */ + public function testAdd() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Condition\ConditionCollection::isEmpty + * @todo Implement testIsEmpty(). + */ + public function testIsEmpty() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Condition\ConditionCollection::__toString + * @todo Implement test__toString(). + */ + public function test__toString() + { + // 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/Condition/ConditionEvaluatorTest.php b/core/lib/Thelia/Tests/Condition/ConditionEvaluatorTest.php index 46f597cf2..fdf97de0c 100644 --- a/core/lib/Thelia/Tests/Condition/ConditionEvaluatorTest.php +++ b/core/lib/Thelia/Tests/Condition/ConditionEvaluatorTest.php @@ -25,9 +25,7 @@ namespace Thelia\Condition\Implementation; use Thelia\Condition\ConditionEvaluator; use Thelia\Condition\Operators; -use Thelia\Coupon\FacadeInterface; -use Thelia\Coupon\ConditionCollection; -use Thelia\Model\CurrencyQuery; +use Thelia\Condition\ConditionCollection; /** * Created by JetBrains PhpStorm. diff --git a/core/lib/Thelia/Tests/Condition/ConditionFactoryTest.php b/core/lib/Thelia/Tests/Condition/ConditionFactoryTest.php index b211c4ddf..c99938408 100644 --- a/core/lib/Thelia/Tests/Condition/ConditionFactoryTest.php +++ b/core/lib/Thelia/Tests/Condition/ConditionFactoryTest.php @@ -27,7 +27,7 @@ use Thelia\Condition\ConditionEvaluator; use Thelia\Condition\ConditionFactory; use Thelia\Condition\Operators; use Thelia\Coupon\FacadeInterface; -use Thelia\Coupon\ConditionCollection; +use Thelia\Condition\ConditionCollection; use Thelia\Model\CurrencyQuery; /** diff --git a/core/lib/Thelia/Tests/Condition/Implementation/MatchForTotalAmountManagerTest.php b/core/lib/Thelia/Tests/Condition/Implementation/MatchForTotalAmountManagerTest.php index d95de9d4d..0db635e51 100644 --- a/core/lib/Thelia/Tests/Condition/Implementation/MatchForTotalAmountManagerTest.php +++ b/core/lib/Thelia/Tests/Condition/Implementation/MatchForTotalAmountManagerTest.php @@ -26,7 +26,7 @@ namespace Thelia\Condition\Implementation; use Thelia\Condition\ConditionEvaluator; use Thelia\Condition\ConditionFactory; use Thelia\Condition\Operators; -use Thelia\Coupon\ConditionCollection; +use Thelia\Condition\ConditionCollection; use Thelia\Coupon\FacadeInterface; use Thelia\Exception\InvalidConditionValueException; use Thelia\Model\Currency; diff --git a/core/lib/Thelia/Tests/Coupon/BaseFacadeTest.php b/core/lib/Thelia/Tests/Coupon/BaseFacadeTest.php new file mode 100644 index 000000000..75ec32382 --- /dev/null +++ b/core/lib/Thelia/Tests/Coupon/BaseFacadeTest.php @@ -0,0 +1,277 @@ +. */ +/* */ +/**********************************************************************************/ + +namespace Thelia\Coupon; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * Unit Test BaseFacade Class + * Generated by PHPUnit_SkeletonGenerator 1.2.1 on 2013-11-17 at 18:59:24. + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class BaseFacadeTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var BaseFacade + */ + protected $object; + + /** + * Sets up the fixture, for example, opens a network connection. + * This method is called before a test is executed. + */ + protected function setUp() + { + $this->object = new BaseFacade; + } + + /** + * 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\BaseFacade::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\BaseFacade::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\BaseFacade::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.' + ); + } + + /** + * @covers Thelia\Coupon\BaseFacade::getCheckoutTotalPrice + * @todo Implement testGetCheckoutTotalPrice(). + */ + public function testGetCheckoutTotalPrice() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\BaseFacade::getCheckoutPostagePrice + * @todo Implement testGetCheckoutPostagePrice(). + */ + public function testGetCheckoutPostagePrice() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\BaseFacade::getCartTotalPrice + * @todo Implement testGetCartTotalPrice(). + */ + public function testGetCartTotalPrice() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\BaseFacade::getCheckoutCurrency + * @todo Implement testGetCheckoutCurrency(). + */ + public function testGetCheckoutCurrency() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\BaseFacade::getNbArticlesInCart + * @todo Implement testGetNbArticlesInCart(). + */ + public function testGetNbArticlesInCart() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\BaseFacade::getCurrentCoupons + * @todo Implement testGetCurrentCoupons(). + */ + public function testGetCurrentCoupons() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\BaseFacade::findOneCouponByCode + * @todo Implement testFindOneCouponByCode(). + */ + public function testFindOneCouponByCode() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\BaseFacade::getContainer + * @todo Implement testGetContainer(). + */ + public function testGetContainer() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\BaseFacade::getTranslator + * @todo Implement testGetTranslator(). + */ + public function testGetTranslator() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\BaseFacade::getMainCurrency + * @todo Implement testGetMainCurrency(). + */ + public function testGetMainCurrency() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\BaseFacade::getRequest + * @todo Implement testGetRequest(). + */ + public function testGetRequest() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\BaseFacade::getConditionEvaluator + * @todo Implement testGetConditionEvaluator(). + */ + public function testGetConditionEvaluator() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\BaseFacade::getAvailableCurrencies + * @todo Implement testGetAvailableCurrencies(). + */ + public function testGetAvailableCurrencies() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\BaseFacade::getDispatcher + * @todo Implement testGetDispatcher(). + */ + public function testGetDispatcher() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\BaseFacade::getCartFromTrait + * @todo Implement testGetCartFromTrait(). + */ + public function testGetCartFromTrait() + { + // 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..3c9fbc8f3 --- /dev/null +++ b/core/lib/Thelia/Tests/Coupon/CouponFactoryTest.php @@ -0,0 +1,73 @@ +. */ +/* */ +/**********************************************************************************/ + +namespace Thelia\Coupon; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * Unit Test CouponFactory Class + * Generated by PHPUnit_SkeletonGenerator 1.2.1 on 2013-11-17 at 18:59:24. + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class CouponFactoryTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var CouponFactory + */ + protected $object; + + /** + * Sets up the fixture, for example, opens a network connection. + * This method is called before a test is executed. + */ + protected function setUp() + { + $this->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::buildCouponFromCode + * @todo Implement testBuildCouponFromCode(). + */ + public function testBuildCouponFromCode() + { + // 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..2a33271bf --- /dev/null +++ b/core/lib/Thelia/Tests/Coupon/CouponManagerTest.php @@ -0,0 +1,133 @@ +. */ +/* */ +/**********************************************************************************/ + +namespace Thelia\Coupon; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * Unit Test CouponManager Class + * Generated by PHPUnit_SkeletonGenerator 1.2.1 on 2013-11-17 at 18:59:24. + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class CouponManagerTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var CouponManager + */ + protected $object; + + /** + * Sets up the fixture, for example, opens a network connection. + * This method is called before a test is executed. + */ + protected function setUp() + { + $this->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.' + ); + } + + /** + * @covers Thelia\Coupon\CouponManager::addAvailableCoupon + * @todo Implement testAddAvailableCoupon(). + */ + public function testAddAvailableCoupon() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\CouponManager::getAvailableCoupons + * @todo Implement testGetAvailableCoupons(). + */ + public function testGetAvailableCoupons() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\CouponManager::addAvailableCondition + * @todo Implement testAddAvailableCondition(). + */ + public function testAddAvailableCondition() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\CouponManager::getAvailableConditions + * @todo Implement testGetAvailableConditions(). + */ + public function testGetAvailableConditions() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\CouponManager::decrementeQuantity + * @todo Implement testDecrementeQuantity(). + */ + public function testDecrementeQuantity() + { + // 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/CouponAbstractTest.php b/core/lib/Thelia/Tests/Coupon/Type/CouponAbstractTest.php new file mode 100644 index 000000000..82a4fc0a4 --- /dev/null +++ b/core/lib/Thelia/Tests/Coupon/Type/CouponAbstractTest.php @@ -0,0 +1,265 @@ +. */ +/* */ +/**********************************************************************************/ + +namespace Thelia\Coupon\Type; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * Unit Test CouponAbstract Class + * Generated by PHPUnit_SkeletonGenerator 1.2.1 on 2013-11-17 at 18:59:24. + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class CouponAbstractTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var CouponAbstract + */ + protected $object; + + /** + * Sets up the fixture, for example, opens a network connection. + * This method is called before a test is executed. + */ + protected function setUp() + { +// $this->object = new CouponAbstract(); + } + + /** + * 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\Type\CouponAbstract::setOrganizer + * @todo Implement testSetOrganizer(). + */ + public function testSetOrganizer() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\Type\CouponAbstract::getCode + * @todo Implement testGetCode(). + */ + public function testGetCode() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\Type\CouponAbstract::getTitle + * @todo Implement testGetTitle(). + */ + public function testGetTitle() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\Type\CouponAbstract::getShortDescription + * @todo Implement testGetShortDescription(). + */ + public function testGetShortDescription() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\Type\CouponAbstract::getDescription + * @todo Implement testGetDescription(). + */ + public function testGetDescription() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\Type\CouponAbstract::isCumulative + * @todo Implement testIsCumulative(). + */ + public function testIsCumulative() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\Type\CouponAbstract::isRemovingPostage + * @todo Implement testIsRemovingPostage(). + */ + public function testIsRemovingPostage() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\Type\CouponAbstract::exec + * @todo Implement testExec(). + */ + public function testExec() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\Type\CouponAbstract::getConditions + * @todo Implement testGetConditions(). + */ + public function testGetConditions() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\Type\CouponAbstract::setConditions + * @todo Implement testSetConditions(). + */ + public function testSetConditions() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\Type\CouponAbstract::getExpirationDate + * @todo Implement testGetExpirationDate(). + */ + public function testGetExpirationDate() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\Type\CouponAbstract::isAvailableOnSpecialOffers + * @todo Implement testIsAvailableOnSpecialOffers(). + */ + public function testIsAvailableOnSpecialOffers() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\Type\CouponAbstract::isEnabled + * @todo Implement testIsEnabled(). + */ + public function testIsEnabled() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\Type\CouponAbstract::getMaxUsage + * @todo Implement testGetMaxUsage(). + */ + public function testGetMaxUsage() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\Type\CouponAbstract::isExpired + * @todo Implement testIsExpired(). + */ + public function testIsExpired() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\Type\CouponAbstract::getServiceId + * @todo Implement testGetServiceId(). + */ + public function testGetServiceId() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\Type\CouponAbstract::isMatching + * @todo Implement testIsMatching(). + */ + public function testIsMatching() + { + // 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/RemoveXAmountManagerTest.php b/core/lib/Thelia/Tests/Coupon/Type/RemoveXAmountManagerTest.php new file mode 100644 index 000000000..48c3405b1 --- /dev/null +++ b/core/lib/Thelia/Tests/Coupon/Type/RemoveXAmountManagerTest.php @@ -0,0 +1,97 @@ +. */ +/* */ +/**********************************************************************************/ + +namespace Thelia\Coupon\Type; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * Unit Test RemoveXAmountManager Class + * Generated by PHPUnit_SkeletonGenerator 1.2.1 on 2013-11-17 at 18:59:24. + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class RemoveXAmountManagerTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var RemoveXAmountManager + */ + protected $object; + + /** + * Sets up the fixture, for example, opens a network connection. + * This method is called before a test is executed. + */ + protected function setUp() + { +// $this->object = new RemoveXAmountManager; + } + + /** + * 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\Type\RemoveXAmountManager::set + * @todo Implement testSet(). + */ + public function testSet() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\Type\RemoveXAmountManager::getName + * @todo Implement testGetName(). + */ + public function testGetName() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\Type\RemoveXAmountManager::getToolTip + * @todo Implement testGetToolTip(). + */ + public function testGetToolTip() + { + // 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/RemoveXPercentManagerTest.php b/core/lib/Thelia/Tests/Coupon/Type/RemoveXPercentManagerTest.php new file mode 100644 index 000000000..09326ab2a --- /dev/null +++ b/core/lib/Thelia/Tests/Coupon/Type/RemoveXPercentManagerTest.php @@ -0,0 +1,109 @@ +. */ +/* */ +/**********************************************************************************/ + +namespace Thelia\Coupon\Type; + +/** + * Created by JetBrains PhpStorm. + * Date: 8/19/13 + * Time: 3:24 PM + * + * Unit Test RemoveXPercentManager Class + * Generated by PHPUnit_SkeletonGenerator 1.2.1 on 2013-11-17 at 18:59:24. + * + * @package Coupon + * @author Guillaume MOREL + * + */ +class RemoveXPercentManagerTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var RemoveXPercentManager + */ + protected $object; + + /** + * Sets up the fixture, for example, opens a network connection. + * This method is called before a test is executed. + */ + protected function setUp() + { +// $this->object = new RemoveXPercentManager; + } + + /** + * 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\Type\RemoveXPercentManager::set + * @todo Implement testSet(). + */ + public function testSet() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\Type\RemoveXPercentManager::exec + * @todo Implement testExec(). + */ + public function testExec() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\Type\RemoveXPercentManager::getName + * @todo Implement testGetName(). + */ + public function testGetName() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Thelia\Coupon\Type\RemoveXPercentManager::getToolTip + * @todo Implement testGetToolTip(). + */ + public function testGetToolTip() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } +}