Adding/Refactoring unit test
This commit is contained in:
109
core/lib/Thelia/Tests/Condition/ConditionCollectionTest.php
Normal file
109
core/lib/Thelia/Tests/Condition/ConditionCollectionTest.php
Normal file
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
/**********************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/**********************************************************************************/
|
||||
|
||||
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 <gmorel@openstudio.fr>
|
||||
*
|
||||
*/
|
||||
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.'
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user