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