Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Public Attributes | List of all members
ShoppingcartTest Class Reference
Inheritance diagram for ShoppingcartTest:
CDbTestCase CDbTestCase

Public Member Functions

 testToCart ()
 testTmpUser ()
 getItems ($correct=false)
 getTmpUsers ($correct=false)
 setUp ()
 testItemWidget ()
- Public Member Functions inherited from CDbTestCase
 __get ($name)
 __call ($name, $params)
 getFixtureManager ()
 getFixtureData ($name)
 getFixtureRecord ($name, $alias)

Public Attributes

 $items = array()
 $orders = array()
 $tmp_users = array()
 $fixtures
 $data

Additional Inherited Members

- Protected Attributes inherited from CDbTestCase
 $fixtures = false

Detailed Description

Created by JetBrains PhpStorm. User: Andrey Date: 5/24/13 Time: 12:05 PM To change this template use File | Settings | File Templates.

Definition at line 12 of file ShoppingcartTest.php.

Member Function Documentation

ShoppingcartTest::setUp ( )

Sets up the fixture before executing a test method. If you override this method, make sure the parent implementation is invoked. Otherwise, the database fixtures will not be managed properly.

Reimplemented from CDbTestCase.

Definition at line 18 of file shoppingcartTest.php.

References Item\model(), TmpUser\model(), and Order\model().

{
Yii::app()->getModule('shoppingcart')->setImport(array('shoppingcart.controllers.*'));
Item::model()->deleteAll();
Order::model()->deleteAll();
TmpUser::model()->deleteAll();
// import the module-level components
$c = $this->getMock('ItemController', array('redirect'),array('phpunit'));
$c->expects($this->any())
->method('redirect');
$c->setAction(new CInlineAction($c, 'urltest'));
Yii::app()->setController($c);
$am = $this->getMock('AssetsManager',
array('publish'),
array(),
'MocAssetsManager'
)->expects($this->any())
->method('publish');;
Yii::app()->setComponent('assetManager', array('class'=>'MocAssetsManager'));
$this->data = array(
'item_id' => 15,
'title' => 'Item name',
'price' => 99,
'admin_email' => 'andrew_@mail.ru',
'page_id' => 3,
'class' => 'shoppingcart_item',
'shoppingcart_link' => '/Content.Node/service/Shopping_Cart.en.html',
);
}

Member Data Documentation

ShoppingcartTest::$fixtures
Initial value:
array(
)

Definition at line 12 of file shoppingcartTest.php.


The documentation for this class was generated from the following files: