Changeset 18390
- Timestamp:
- 2009/11/20 18:21:15 (14 years ago)
- Location:
- branches/comu-ver2
- Files:
-
- 212 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/test/class/SC_DbConn_Test.php
r18387 r18390 94 94 95 95 /** 96 * SC_DbConn::getAll() のテストケース(エラー). 97 */ 98 function testGetAllIsError() { 99 100 // SC_DbConn::getAll() は接続エラーが発生すると 0 を返す 101 $failur_dsn = "pgsql://user:pass@127.0.0.1:/xxxxx"; 102 $failurDbConn = new SC_DbConn($failur_dsn, false, true); 103 $this->expected = 0; 104 $this->actual = $failurDbConn->getAll("SELECT * FROM test_table"); 105 106 $this->verify(); 107 } 108 109 110 /** 96 111 * SC_DbConn::getOne() のテストケース. 97 112 */ … … 107 122 $this->verify(); 108 123 } 124 125 /** 126 * SC_DbConn::getOne() のテストケース(エラー). 127 */ 128 function testGetOneIsError() { 129 $this->createTestTable(); 130 $this->setTestData(1, "2", "f"); 131 $this->setTestData(1, "2", "f"); 132 $this->setTestData(1, "2", "f"); 133 134 //$this->expected = new PEAR_Error(); 135 $this->actual = $this->objDbConn->getOne("SELECT COUNT(*) FROM xxx_table"); 136 var_dump($this->actual); 137 $this->verify(); 138 } 139 109 140 110 141 /** … … 152 183 $this->actual = $this->objDbConn->getAll("SELECT * FROM test_table"); 153 184 154 $this->assertEquals(1, $result);185 //$this->assertEquals(1, $result); 155 186 $this->verify(); 156 187 }
Note: See TracChangeset
for help on using the changeset viewer.