Changeset 18801 for branches/version-2_5-dev/test/class/SC_Query_Test.php
- Timestamp:
- 2010/09/09 18:05:15 (13 years ago)
- bzr:base-revision:
- ohkouchi@loop-az.jp-20100909013100-rwua4q4xm052kab2
- bzr:committer:
- Kentaro Ohkouchi <ohkouchi@loop-az.jp>
- bzr:file-ids:
data/class/SC_Query.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2FSC_Query.php
test/class/SC_Query_Test.php sc_query_test.php-20100803024127-ljzonih8f5jpan9o-1- bzr:mapping-version:
- v4
- bzr:repository-uuid:
- 1e3b908f-19a9-db11-a64c-001125224ba8
- bzr:revision-id:
- ohkouchi@loop-az.jp-20100909090512-qyyhgu9bnz0iwjna
- bzr:revno:
- 2284
- bzr:revprop:branch-nick:
- branches/version-2_5-dev
- bzr:root:
- branches/version-2_5-dev
- bzr:timestamp:
- 2010-09-09 18:05:12.825000048 +0900
- bzr:user-agent:
- bzr2.2.0+bzr-svn1.0.3
- svn:original-date:
- 2010-09-09T09:05:12.825000Z
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/test/class/SC_Query_Test.php
r18790 r18801 47 47 48 48 function tearDown() { 49 $this->objQuery->rollback();50 49 // MySQL では CREATE TABLE がロールバックされないので DROP TABLE を行う 51 50 $this->dropTestTable(); 51 $this->objQuery->rollback(); 52 52 $this->objQuery = null; 53 53 } … … 83 83 */ 84 84 function testGetAll() { 85 $ this->createTestTable();85 $result = $this->createTestTable(); 86 86 $result = $this->setTestData(1, "2", "f"); 87 87 … … 94 94 $this->verify(); 95 95 } 96 97 /** 98 * SC_Query::select() のテストケース. 99 */ 100 function testSelect() { 101 $this->createTestTable(); 102 $result = $this->setTestData(1, "2", "f"); 103 104 $this->expected = array(array("id" => "1", 105 "column1" => "1", 106 "column2" => "2", 107 "column3" => "f")); 108 109 $this->actual = $this->objQuery->setWhere("id = ?") 110 ->setOrder("id") 111 ->select("*", "test_table", "", array(1)); 112 113 $this->verify(); 114 } 115 96 116 97 117 /** … … 253 273 254 274 function dropTestTable() { 255 return $this->objQuery->query("DROP TABLE test_table"); 275 $tables = $this->objQuery->listTables(); 276 if (in_array("test_table", $tables)) { 277 $this->objQuery->query("DROP TABLE test_table"); 278 } 279 return; 256 280 } 257 281
Note: See TracChangeset
for help on using the changeset viewer.