Changeset 22567 for branches/version-2_12-dev/test/class/page/LC_Page_Admin_Products_ProductClass_Test.php
- Timestamp:
- 2013/02/18 19:09:54 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/test/class/page/LC_Page_Admin_Products_ProductClass_Test.php
r22206 r22567 33 33 * @version $Id$ 34 34 */ 35 class LC_Page_Admin_Products_ProductClass_Test extends PHPUnit_Framework_TestCase { 36 37 function setUp() { 35 class LC_Page_Admin_Products_ProductClass_Test extends PHPUnit_Framework_TestCase 36 { 37 38 function setUp() 39 { 38 40 $this->objQuery =& SC_Query::getSingletonInstance(); 39 41 $this->objQuery->begin(); … … 44 46 } 45 47 46 function tearDown() { 48 function tearDown() 49 { 47 50 $this->objQuery->rollback(); 48 51 $this->objQuery = null; … … 50 53 } 51 54 52 function testInit() { 55 function testInit() 56 { 53 57 54 58 $this->assertEquals('products/product_class.tpl', … … 62 66 } 63 67 64 function testProcess() { 68 function testProcess() 69 { 65 70 $this->objPage->process(); 66 71 } 67 72 68 function testCreateSearchParams() { 73 function testCreateSearchParams() 74 { 69 75 $keys = array('search_product_id', 70 76 'search_product_code', … … 104 110 } 105 111 106 function testGetProductName() { 112 function testGetProductName() 113 { 107 114 $product_id = 10000000; 108 115 $this->expected = "テスト商品"; … … 114 121 } 115 122 116 function testGetProductsClass() { 123 function testGetProductsClass() 124 { 117 125 $product_id = 10000000; 118 126 $product_class_id = 10000; … … 141 149 } 142 150 143 function testGetAllClass() { 151 function testGetAllClass() 152 { 144 153 $this->clearClass(); 145 154 $this->setClass(1000, "大きさ", 1, array('S', 'M', 'L', 'LL')); … … 154 163 } 155 164 156 function testGetAllClassCategory規格1のみ() { 165 function testGetAllClassCategory規格1のみ() 166 { 157 167 $this->clearClass(); 158 168 $this->setClass(1000, "大きさ", 1, array('S', 'M', 'L', 'LL')); … … 182 192 } 183 193 184 function testGetAllClassCategory規格1と3() { 194 function testGetAllClassCategory規格1と3() 195 { 185 196 $this->clearClass(); 186 197 $this->setClass(1000, "大きさ", 1, array('S', 'M', 'L', 'LL')); … … 294 305 } 295 306 296 function testGetProductsClassAndClasscategory() { 307 function testGetProductsClassAndClasscategory() 308 { 297 309 $product_id = 10000; 298 310 $product_class_id = 1000; … … 331 343 } 332 344 333 function verify() { 345 function verify() 346 { 334 347 $this->assertEquals($this->expected, $this->actual); 335 348 } 336 349 337 function setProduct($product_id, $name) { 350 function setProduct($product_id, $name) 351 { 338 352 $val['product_id'] = $product_id; 339 353 $val['name'] = $name; … … 343 357 } 344 358 345 function setProductsClass($product_id, $product_class_id, $class_combination_id = null) { 359 function setProductsClass($product_id, $product_class_id, $class_combination_id = null) 360 { 346 361 $val['product_class_id'] = $product_class_id; 347 362 $val['product_id'] = $product_id; … … 365 380 } 366 381 367 function clearClass() { 382 function clearClass() 383 { 368 384 $this->objQuery->delete('dtb_class'); 369 385 $this->objQuery->delete('dtb_classcategory'); … … 378 394 * @param array $classcategory 規格分類名の配列 379 395 */ 380 function setClass($class_id, $class_name, $rank, $classcategory) { 396 function setClass($class_id, $class_name, $rank, $classcategory) 397 { 381 398 $val['class_id'] = $class_id; 382 399 $val['name'] = $class_name; … … 397 414 } 398 415 399 class LC_Page_Admin_Products_ProductClass_Mock extends LC_Page_Admin_Products_ProductClass { 400 401 function authorization() { 416 class LC_Page_Admin_Products_ProductClass_Mock extends LC_Page_Admin_Products_ProductClass 417 { 418 419 function authorization() 420 { 402 421 // quiet. 403 422 } 404 423 405 function assignView() { 424 function assignView() 425 { 406 426 // quiet. 407 427 }
Note: See TracChangeset
for help on using the changeset viewer.