|
@@ 180-212 (lines=33) @@
|
| 177 |
|
* |
| 178 |
|
* getAttribute()のテスト(引数"AUTOCOMMIT"指定時) |
| 179 |
|
*/ |
| 180 |
|
public function test_getAttribute_AUTOCOMMIT() |
| 181 |
|
{ |
| 182 |
|
$params = [ |
| 183 |
|
"driver" => $GLOBALS[ 'DB_DRIVER' ], |
| 184 |
|
"user" => $GLOBALS[ 'DB_USER' ], |
| 185 |
|
"pass" => $GLOBALS[ 'DB_PASSWORD' ], |
| 186 |
|
"dbname" => $GLOBALS[ 'DB_DBNAME' ], |
| 187 |
|
"host" => $GLOBALS[ 'DB_HOST' ], |
| 188 |
|
"persistent" => false, |
| 189 |
|
]; |
| 190 |
|
|
| 191 |
|
$instance = new Db; |
| 192 |
|
$instance->connect( $params ); |
| 193 |
|
$tmp_result = $instance->getAttribute( 'AUTOCOMMIT' ); |
| 194 |
|
|
| 195 |
|
$this->assertArrayHasKey( 'AUTOCOMMIT', $tmp_result ); |
| 196 |
|
$this->assertArrayNotHasKey( 'PREFETCH', $tmp_result ); |
| 197 |
|
$this->assertArrayNotHasKey( 'TIMEOUT', $tmp_result ); |
| 198 |
|
$this->assertArrayNotHasKey( 'ERRMODE', $tmp_result ); |
| 199 |
|
$this->assertArrayNotHasKey( 'SERVER_VERSION', $tmp_result ); |
| 200 |
|
$this->assertArrayNotHasKey( 'CLIENT_VERSION', $tmp_result ); |
| 201 |
|
$this->assertArrayNotHasKey( 'SERVER_INFO', $tmp_result ); |
| 202 |
|
$this->assertArrayNotHasKey( 'CONNECTION_STATUS', $tmp_result ); |
| 203 |
|
$this->assertArrayNotHasKey( 'CASE', $tmp_result ); |
| 204 |
|
$this->assertArrayNotHasKey( 'DRIVER_NAME', $tmp_result ); |
| 205 |
|
$this->assertArrayNotHasKey( 'ORACLE_NULLS', $tmp_result ); |
| 206 |
|
$this->assertArrayNotHasKey( 'PERSISTENT', $tmp_result ); |
| 207 |
|
$this->assertArrayNotHasKey( 'STATEMENT_CLASS', $tmp_result ); |
| 208 |
|
$this->assertArrayNotHasKey( 'DEFAULT_FETCH_MODE', $tmp_result ); |
| 209 |
|
|
| 210 |
|
$instance->disConnect(); |
| 211 |
|
unset( $instance ); |
| 212 |
|
} |
| 213 |
|
|
| 214 |
|
/** |
| 215 |
|
* test_getAttribute_PREFETCH() |
|
@@ 219-251 (lines=33) @@
|
| 216 |
|
* |
| 217 |
|
* getAttribute()のテスト(引数"PREFETCH"指定時) |
| 218 |
|
*/ |
| 219 |
|
public function test_getAttribute_PREFETCH() |
| 220 |
|
{ |
| 221 |
|
$params = [ |
| 222 |
|
"driver" => $GLOBALS[ 'DB_DRIVER' ], |
| 223 |
|
"user" => $GLOBALS[ 'DB_USER' ], |
| 224 |
|
"pass" => $GLOBALS[ 'DB_PASSWORD' ], |
| 225 |
|
"dbname" => $GLOBALS[ 'DB_DBNAME' ], |
| 226 |
|
"host" => $GLOBALS[ 'DB_HOST' ], |
| 227 |
|
"persistent" => false, |
| 228 |
|
]; |
| 229 |
|
|
| 230 |
|
$instance = new Db; |
| 231 |
|
$instance->connect( $params ); |
| 232 |
|
$tmp_result = $instance->getAttribute( 'PREFETCH' ); |
| 233 |
|
|
| 234 |
|
$this->assertArrayNotHasKey( 'AUTOCOMMIT', $tmp_result ); |
| 235 |
|
$this->assertArrayHasKey( 'PREFETCH', $tmp_result ); |
| 236 |
|
$this->assertArrayNotHasKey( 'TIMEOUT', $tmp_result ); |
| 237 |
|
$this->assertArrayNotHasKey( 'ERRMODE', $tmp_result ); |
| 238 |
|
$this->assertArrayNotHasKey( 'SERVER_VERSION', $tmp_result ); |
| 239 |
|
$this->assertArrayNotHasKey( 'CLIENT_VERSION', $tmp_result ); |
| 240 |
|
$this->assertArrayNotHasKey( 'SERVER_INFO', $tmp_result ); |
| 241 |
|
$this->assertArrayNotHasKey( 'CONNECTION_STATUS', $tmp_result ); |
| 242 |
|
$this->assertArrayNotHasKey( 'CASE', $tmp_result ); |
| 243 |
|
$this->assertArrayNotHasKey( 'DRIVER_NAME', $tmp_result ); |
| 244 |
|
$this->assertArrayNotHasKey( 'ORACLE_NULLS', $tmp_result ); |
| 245 |
|
$this->assertArrayNotHasKey( 'PERSISTENT', $tmp_result ); |
| 246 |
|
$this->assertArrayNotHasKey( 'STATEMENT_CLASS', $tmp_result ); |
| 247 |
|
$this->assertArrayNotHasKey( 'DEFAULT_FETCH_MODE', $tmp_result ); |
| 248 |
|
|
| 249 |
|
$instance->disConnect(); |
| 250 |
|
unset( $instance ); |
| 251 |
|
} |
| 252 |
|
|
| 253 |
|
/** |
| 254 |
|
* test_getAttribute_TIMEOUT() |
|
@@ 258-290 (lines=33) @@
|
| 255 |
|
* |
| 256 |
|
* getAttribute()のテスト(引数"TIMEOUT"指定時) |
| 257 |
|
*/ |
| 258 |
|
public function test_getAttribute_TIMEOUT() |
| 259 |
|
{ |
| 260 |
|
$params = [ |
| 261 |
|
"driver" => $GLOBALS[ 'DB_DRIVER' ], |
| 262 |
|
"user" => $GLOBALS[ 'DB_USER' ], |
| 263 |
|
"pass" => $GLOBALS[ 'DB_PASSWORD' ], |
| 264 |
|
"dbname" => $GLOBALS[ 'DB_DBNAME' ], |
| 265 |
|
"host" => $GLOBALS[ 'DB_HOST' ], |
| 266 |
|
"persistent" => false, |
| 267 |
|
]; |
| 268 |
|
|
| 269 |
|
$instance = new Db; |
| 270 |
|
$instance->connect( $params ); |
| 271 |
|
$tmp_result = $instance->getAttribute( 'TIMEOUT' ); |
| 272 |
|
|
| 273 |
|
$this->assertArrayNotHasKey( 'AUTOCOMMIT', $tmp_result ); |
| 274 |
|
$this->assertArrayNotHasKey( 'PREFETCH', $tmp_result ); |
| 275 |
|
$this->assertArrayHasKey( 'TIMEOUT', $tmp_result ); |
| 276 |
|
$this->assertArrayNotHasKey( 'ERRMODE', $tmp_result ); |
| 277 |
|
$this->assertArrayNotHasKey( 'SERVER_VERSION', $tmp_result ); |
| 278 |
|
$this->assertArrayNotHasKey( 'CLIENT_VERSION', $tmp_result ); |
| 279 |
|
$this->assertArrayNotHasKey( 'SERVER_INFO', $tmp_result ); |
| 280 |
|
$this->assertArrayNotHasKey( 'CONNECTION_STATUS', $tmp_result ); |
| 281 |
|
$this->assertArrayNotHasKey( 'CASE', $tmp_result ); |
| 282 |
|
$this->assertArrayNotHasKey( 'DRIVER_NAME', $tmp_result ); |
| 283 |
|
$this->assertArrayNotHasKey( 'ORACLE_NULLS', $tmp_result ); |
| 284 |
|
$this->assertArrayNotHasKey( 'PERSISTENT', $tmp_result ); |
| 285 |
|
$this->assertArrayNotHasKey( 'STATEMENT_CLASS', $tmp_result ); |
| 286 |
|
$this->assertArrayNotHasKey( 'DEFAULT_FETCH_MODE', $tmp_result ); |
| 287 |
|
|
| 288 |
|
$instance->disConnect(); |
| 289 |
|
unset( $instance ); |
| 290 |
|
} |
| 291 |
|
|
| 292 |
|
/** |
| 293 |
|
* test_getAttribute_ERRMODE() |
|
@@ 297-329 (lines=33) @@
|
| 294 |
|
* |
| 295 |
|
* getAttribute()のテスト(引数"ERRMODE"指定時) |
| 296 |
|
*/ |
| 297 |
|
public function test_getAttribute_ERRMODE() |
| 298 |
|
{ |
| 299 |
|
$params = [ |
| 300 |
|
"driver" => $GLOBALS[ 'DB_DRIVER' ], |
| 301 |
|
"user" => $GLOBALS[ 'DB_USER' ], |
| 302 |
|
"pass" => $GLOBALS[ 'DB_PASSWORD' ], |
| 303 |
|
"dbname" => $GLOBALS[ 'DB_DBNAME' ], |
| 304 |
|
"host" => $GLOBALS[ 'DB_HOST' ], |
| 305 |
|
"persistent" => false, |
| 306 |
|
]; |
| 307 |
|
|
| 308 |
|
$instance = new Db; |
| 309 |
|
$instance->connect( $params ); |
| 310 |
|
$tmp_result = $instance->getAttribute( 'ERRMODE' ); |
| 311 |
|
|
| 312 |
|
$this->assertArrayNotHasKey( 'AUTOCOMMIT', $tmp_result ); |
| 313 |
|
$this->assertArrayNotHasKey( 'PREFETCH', $tmp_result ); |
| 314 |
|
$this->assertArrayNotHasKey( 'TIMEOUT', $tmp_result ); |
| 315 |
|
$this->assertArrayHasKey( 'ERRMODE', $tmp_result ); |
| 316 |
|
$this->assertArrayNotHasKey( 'SERVER_VERSION', $tmp_result ); |
| 317 |
|
$this->assertArrayNotHasKey( 'CLIENT_VERSION', $tmp_result ); |
| 318 |
|
$this->assertArrayNotHasKey( 'SERVER_INFO', $tmp_result ); |
| 319 |
|
$this->assertArrayNotHasKey( 'CONNECTION_STATUS', $tmp_result ); |
| 320 |
|
$this->assertArrayNotHasKey( 'CASE', $tmp_result ); |
| 321 |
|
$this->assertArrayNotHasKey( 'DRIVER_NAME', $tmp_result ); |
| 322 |
|
$this->assertArrayNotHasKey( 'ORACLE_NULLS', $tmp_result ); |
| 323 |
|
$this->assertArrayNotHasKey( 'PERSISTENT', $tmp_result ); |
| 324 |
|
$this->assertArrayNotHasKey( 'STATEMENT_CLASS', $tmp_result ); |
| 325 |
|
$this->assertArrayNotHasKey( 'DEFAULT_FETCH_MODE', $tmp_result ); |
| 326 |
|
|
| 327 |
|
$instance->disConnect(); |
| 328 |
|
unset( $instance ); |
| 329 |
|
} |
| 330 |
|
|
| 331 |
|
/** |
| 332 |
|
* test_getAttribute_SERVER_VERSION() |
|
@@ 336-368 (lines=33) @@
|
| 333 |
|
* |
| 334 |
|
* getAttribute()のテスト(引数"SERVER_VERSION"指定時) |
| 335 |
|
*/ |
| 336 |
|
public function test_getAttribute_SERVER_VERSION() |
| 337 |
|
{ |
| 338 |
|
$params = [ |
| 339 |
|
"driver" => $GLOBALS[ 'DB_DRIVER' ], |
| 340 |
|
"user" => $GLOBALS[ 'DB_USER' ], |
| 341 |
|
"pass" => $GLOBALS[ 'DB_PASSWORD' ], |
| 342 |
|
"dbname" => $GLOBALS[ 'DB_DBNAME' ], |
| 343 |
|
"host" => $GLOBALS[ 'DB_HOST' ], |
| 344 |
|
"persistent" => false, |
| 345 |
|
]; |
| 346 |
|
|
| 347 |
|
$instance = new Db; |
| 348 |
|
$instance->connect( $params ); |
| 349 |
|
$tmp_result = $instance->getAttribute( 'SERVER_VERSION' ); |
| 350 |
|
|
| 351 |
|
$this->assertArrayNotHasKey( 'AUTOCOMMIT', $tmp_result ); |
| 352 |
|
$this->assertArrayNotHasKey( 'PREFETCH', $tmp_result ); |
| 353 |
|
$this->assertArrayNotHasKey( 'TIMEOUT', $tmp_result ); |
| 354 |
|
$this->assertArrayNotHasKey( 'ERRMODE', $tmp_result ); |
| 355 |
|
$this->assertArrayHasKey( 'SERVER_VERSION', $tmp_result ); |
| 356 |
|
$this->assertArrayNotHasKey( 'CLIENT_VERSION', $tmp_result ); |
| 357 |
|
$this->assertArrayNotHasKey( 'SERVER_INFO', $tmp_result ); |
| 358 |
|
$this->assertArrayNotHasKey( 'CONNECTION_STATUS', $tmp_result ); |
| 359 |
|
$this->assertArrayNotHasKey( 'CASE', $tmp_result ); |
| 360 |
|
$this->assertArrayNotHasKey( 'DRIVER_NAME', $tmp_result ); |
| 361 |
|
$this->assertArrayNotHasKey( 'ORACLE_NULLS', $tmp_result ); |
| 362 |
|
$this->assertArrayNotHasKey( 'PERSISTENT', $tmp_result ); |
| 363 |
|
$this->assertArrayNotHasKey( 'STATEMENT_CLASS', $tmp_result ); |
| 364 |
|
$this->assertArrayNotHasKey( 'DEFAULT_FETCH_MODE', $tmp_result ); |
| 365 |
|
|
| 366 |
|
$instance->disConnect(); |
| 367 |
|
unset( $instance ); |
| 368 |
|
} |
| 369 |
|
|
| 370 |
|
/** |
| 371 |
|
* test_getAttribute_CLIENT_VERSION() |
|
@@ 375-407 (lines=33) @@
|
| 372 |
|
* |
| 373 |
|
* getAttribute()のテスト(引数"CLIENT_VERSION"指定時) |
| 374 |
|
*/ |
| 375 |
|
public function test_getAttribute_CLIENT_VERSION() |
| 376 |
|
{ |
| 377 |
|
$params = [ |
| 378 |
|
"driver" => $GLOBALS[ 'DB_DRIVER' ], |
| 379 |
|
"user" => $GLOBALS[ 'DB_USER' ], |
| 380 |
|
"pass" => $GLOBALS[ 'DB_PASSWORD' ], |
| 381 |
|
"dbname" => $GLOBALS[ 'DB_DBNAME' ], |
| 382 |
|
"host" => $GLOBALS[ 'DB_HOST' ], |
| 383 |
|
"persistent" => false, |
| 384 |
|
]; |
| 385 |
|
|
| 386 |
|
$instance = new Db; |
| 387 |
|
$instance->connect( $params ); |
| 388 |
|
$tmp_result = $instance->getAttribute( 'CLIENT_VERSION' ); |
| 389 |
|
|
| 390 |
|
$this->assertArrayNotHasKey( 'AUTOCOMMIT', $tmp_result ); |
| 391 |
|
$this->assertArrayNotHasKey( 'PREFETCH', $tmp_result ); |
| 392 |
|
$this->assertArrayNotHasKey( 'TIMEOUT', $tmp_result ); |
| 393 |
|
$this->assertArrayNotHasKey( 'ERRMODE', $tmp_result ); |
| 394 |
|
$this->assertArrayNotHasKey( 'SERVER_VERSION', $tmp_result ); |
| 395 |
|
$this->assertArrayHasKey( 'CLIENT_VERSION', $tmp_result ); |
| 396 |
|
$this->assertArrayNotHasKey( 'SERVER_INFO', $tmp_result ); |
| 397 |
|
$this->assertArrayNotHasKey( 'CONNECTION_STATUS', $tmp_result ); |
| 398 |
|
$this->assertArrayNotHasKey( 'CASE', $tmp_result ); |
| 399 |
|
$this->assertArrayNotHasKey( 'DRIVER_NAME', $tmp_result ); |
| 400 |
|
$this->assertArrayNotHasKey( 'ORACLE_NULLS', $tmp_result ); |
| 401 |
|
$this->assertArrayNotHasKey( 'PERSISTENT', $tmp_result ); |
| 402 |
|
$this->assertArrayNotHasKey( 'STATEMENT_CLASS', $tmp_result ); |
| 403 |
|
$this->assertArrayNotHasKey( 'DEFAULT_FETCH_MODE', $tmp_result ); |
| 404 |
|
|
| 405 |
|
$instance->disConnect(); |
| 406 |
|
unset( $instance ); |
| 407 |
|
} |
| 408 |
|
|
| 409 |
|
/** |
| 410 |
|
* test_getAttribute_SERVER_INFO() |
|
@@ 414-446 (lines=33) @@
|
| 411 |
|
* |
| 412 |
|
* getAttribute()のテスト(引数"SERVER_INFO"指定時) |
| 413 |
|
*/ |
| 414 |
|
public function test_getAttribute_SERVER_INFO() |
| 415 |
|
{ |
| 416 |
|
$params = [ |
| 417 |
|
"driver" => $GLOBALS[ 'DB_DRIVER' ], |
| 418 |
|
"user" => $GLOBALS[ 'DB_USER' ], |
| 419 |
|
"pass" => $GLOBALS[ 'DB_PASSWORD' ], |
| 420 |
|
"dbname" => $GLOBALS[ 'DB_DBNAME' ], |
| 421 |
|
"host" => $GLOBALS[ 'DB_HOST' ], |
| 422 |
|
"persistent" => false, |
| 423 |
|
]; |
| 424 |
|
|
| 425 |
|
$instance = new Db; |
| 426 |
|
$instance->connect( $params ); |
| 427 |
|
$tmp_result = $instance->getAttribute( 'SERVER_INFO' ); |
| 428 |
|
|
| 429 |
|
$this->assertArrayNotHasKey( 'AUTOCOMMIT', $tmp_result ); |
| 430 |
|
$this->assertArrayNotHasKey( 'PREFETCH', $tmp_result ); |
| 431 |
|
$this->assertArrayNotHasKey( 'TIMEOUT', $tmp_result ); |
| 432 |
|
$this->assertArrayNotHasKey( 'ERRMODE', $tmp_result ); |
| 433 |
|
$this->assertArrayNotHasKey( 'SERVER_VERSION', $tmp_result ); |
| 434 |
|
$this->assertArrayNotHasKey( 'CLIENT_VERSION', $tmp_result ); |
| 435 |
|
$this->assertArrayHasKey( 'SERVER_INFO', $tmp_result ); |
| 436 |
|
$this->assertArrayNotHasKey( 'CONNECTION_STATUS', $tmp_result ); |
| 437 |
|
$this->assertArrayNotHasKey( 'CASE', $tmp_result ); |
| 438 |
|
$this->assertArrayNotHasKey( 'DRIVER_NAME', $tmp_result ); |
| 439 |
|
$this->assertArrayNotHasKey( 'ORACLE_NULLS', $tmp_result ); |
| 440 |
|
$this->assertArrayNotHasKey( 'PERSISTENT', $tmp_result ); |
| 441 |
|
$this->assertArrayNotHasKey( 'STATEMENT_CLASS', $tmp_result ); |
| 442 |
|
$this->assertArrayNotHasKey( 'DEFAULT_FETCH_MODE', $tmp_result ); |
| 443 |
|
|
| 444 |
|
$instance->disConnect(); |
| 445 |
|
unset( $instance ); |
| 446 |
|
} |
| 447 |
|
|
| 448 |
|
/** |
| 449 |
|
* test_getAttribute_CONNECTION_STATUS() |
|
@@ 453-485 (lines=33) @@
|
| 450 |
|
* |
| 451 |
|
* getAttribute()のテスト(引数"CONNECTION_STATUS"指定時) |
| 452 |
|
*/ |
| 453 |
|
public function test_getAttribute_CONNECTION_STATUS() |
| 454 |
|
{ |
| 455 |
|
$params = [ |
| 456 |
|
"driver" => $GLOBALS[ 'DB_DRIVER' ], |
| 457 |
|
"user" => $GLOBALS[ 'DB_USER' ], |
| 458 |
|
"pass" => $GLOBALS[ 'DB_PASSWORD' ], |
| 459 |
|
"dbname" => $GLOBALS[ 'DB_DBNAME' ], |
| 460 |
|
"host" => $GLOBALS[ 'DB_HOST' ], |
| 461 |
|
"persistent" => false, |
| 462 |
|
]; |
| 463 |
|
|
| 464 |
|
$instance = new Db; |
| 465 |
|
$instance->connect( $params ); |
| 466 |
|
$tmp_result = $instance->getAttribute( 'CONNECTION_STATUS' ); |
| 467 |
|
|
| 468 |
|
$this->assertArrayNotHasKey( 'AUTOCOMMIT', $tmp_result ); |
| 469 |
|
$this->assertArrayNotHasKey( 'PREFETCH', $tmp_result ); |
| 470 |
|
$this->assertArrayNotHasKey( 'TIMEOUT', $tmp_result ); |
| 471 |
|
$this->assertArrayNotHasKey( 'ERRMODE', $tmp_result ); |
| 472 |
|
$this->assertArrayNotHasKey( 'SERVER_VERSION', $tmp_result ); |
| 473 |
|
$this->assertArrayNotHasKey( 'CLIENT_VERSION', $tmp_result ); |
| 474 |
|
$this->assertArrayNotHasKey( 'SERVER_INFO', $tmp_result ); |
| 475 |
|
$this->assertArrayHasKey( 'CONNECTION_STATUS', $tmp_result ); |
| 476 |
|
$this->assertArrayNotHasKey( 'CASE', $tmp_result ); |
| 477 |
|
$this->assertArrayNotHasKey( 'DRIVER_NAME', $tmp_result ); |
| 478 |
|
$this->assertArrayNotHasKey( 'ORACLE_NULLS', $tmp_result ); |
| 479 |
|
$this->assertArrayNotHasKey( 'PERSISTENT', $tmp_result ); |
| 480 |
|
$this->assertArrayNotHasKey( 'STATEMENT_CLASS', $tmp_result ); |
| 481 |
|
$this->assertArrayNotHasKey( 'DEFAULT_FETCH_MODE', $tmp_result ); |
| 482 |
|
|
| 483 |
|
$instance->disConnect(); |
| 484 |
|
unset( $instance ); |
| 485 |
|
} |
| 486 |
|
|
| 487 |
|
/** |
| 488 |
|
* test_getAttribute_CASE() |
|
@@ 492-524 (lines=33) @@
|
| 489 |
|
* |
| 490 |
|
* getAttribute()のテスト(引数"CASE"指定時) |
| 491 |
|
*/ |
| 492 |
|
public function test_getAttribute_CASE() |
| 493 |
|
{ |
| 494 |
|
$params = [ |
| 495 |
|
"driver" => $GLOBALS[ 'DB_DRIVER' ], |
| 496 |
|
"user" => $GLOBALS[ 'DB_USER' ], |
| 497 |
|
"pass" => $GLOBALS[ 'DB_PASSWORD' ], |
| 498 |
|
"dbname" => $GLOBALS[ 'DB_DBNAME' ], |
| 499 |
|
"host" => $GLOBALS[ 'DB_HOST' ], |
| 500 |
|
"persistent" => false, |
| 501 |
|
]; |
| 502 |
|
|
| 503 |
|
$instance = new Db; |
| 504 |
|
$instance->connect( $params ); |
| 505 |
|
$tmp_result = $instance->getAttribute( 'CASE' ); |
| 506 |
|
|
| 507 |
|
$this->assertArrayNotHasKey( 'AUTOCOMMIT', $tmp_result ); |
| 508 |
|
$this->assertArrayNotHasKey( 'PREFETCH', $tmp_result ); |
| 509 |
|
$this->assertArrayNotHasKey( 'TIMEOUT', $tmp_result ); |
| 510 |
|
$this->assertArrayNotHasKey( 'ERRMODE', $tmp_result ); |
| 511 |
|
$this->assertArrayNotHasKey( 'SERVER_VERSION', $tmp_result ); |
| 512 |
|
$this->assertArrayNotHasKey( 'CLIENT_VERSION', $tmp_result ); |
| 513 |
|
$this->assertArrayNotHasKey( 'SERVER_INFO', $tmp_result ); |
| 514 |
|
$this->assertArrayNotHasKey( 'CONNECTION_STATUS', $tmp_result ); |
| 515 |
|
$this->assertArrayHasKey( 'CASE', $tmp_result ); |
| 516 |
|
$this->assertArrayNotHasKey( 'DRIVER_NAME', $tmp_result ); |
| 517 |
|
$this->assertArrayNotHasKey( 'ORACLE_NULLS', $tmp_result ); |
| 518 |
|
$this->assertArrayNotHasKey( 'PERSISTENT', $tmp_result ); |
| 519 |
|
$this->assertArrayNotHasKey( 'STATEMENT_CLASS', $tmp_result ); |
| 520 |
|
$this->assertArrayNotHasKey( 'DEFAULT_FETCH_MODE', $tmp_result ); |
| 521 |
|
|
| 522 |
|
$instance->disConnect(); |
| 523 |
|
unset( $instance ); |
| 524 |
|
} |
| 525 |
|
|
| 526 |
|
/** |
| 527 |
|
* test_getAttribute_DRIVER_NAME() |
|
@@ 531-563 (lines=33) @@
|
| 528 |
|
* |
| 529 |
|
* getAttribute()のテスト(引数"DRIVER_NAME"指定時) |
| 530 |
|
*/ |
| 531 |
|
public function test_getAttribute_DRIVER_NAME() |
| 532 |
|
{ |
| 533 |
|
$params = [ |
| 534 |
|
"driver" => $GLOBALS[ 'DB_DRIVER' ], |
| 535 |
|
"user" => $GLOBALS[ 'DB_USER' ], |
| 536 |
|
"pass" => $GLOBALS[ 'DB_PASSWORD' ], |
| 537 |
|
"dbname" => $GLOBALS[ 'DB_DBNAME' ], |
| 538 |
|
"host" => $GLOBALS[ 'DB_HOST' ], |
| 539 |
|
"persistent" => false, |
| 540 |
|
]; |
| 541 |
|
|
| 542 |
|
$instance = new Db; |
| 543 |
|
$instance->connect( $params ); |
| 544 |
|
$tmp_result = $instance->getAttribute( 'DRIVER_NAME' ); |
| 545 |
|
|
| 546 |
|
$this->assertArrayNotHasKey( 'AUTOCOMMIT', $tmp_result ); |
| 547 |
|
$this->assertArrayNotHasKey( 'PREFETCH', $tmp_result ); |
| 548 |
|
$this->assertArrayNotHasKey( 'TIMEOUT', $tmp_result ); |
| 549 |
|
$this->assertArrayNotHasKey( 'ERRMODE', $tmp_result ); |
| 550 |
|
$this->assertArrayNotHasKey( 'SERVER_VERSION', $tmp_result ); |
| 551 |
|
$this->assertArrayNotHasKey( 'CLIENT_VERSION', $tmp_result ); |
| 552 |
|
$this->assertArrayNotHasKey( 'SERVER_INFO', $tmp_result ); |
| 553 |
|
$this->assertArrayNotHasKey( 'CONNECTION_STATUS', $tmp_result ); |
| 554 |
|
$this->assertArrayNotHasKey( 'CASE', $tmp_result ); |
| 555 |
|
$this->assertArrayHasKey( 'DRIVER_NAME', $tmp_result ); |
| 556 |
|
$this->assertArrayNotHasKey( 'ORACLE_NULLS', $tmp_result ); |
| 557 |
|
$this->assertArrayNotHasKey( 'PERSISTENT', $tmp_result ); |
| 558 |
|
$this->assertArrayNotHasKey( 'STATEMENT_CLASS', $tmp_result ); |
| 559 |
|
$this->assertArrayNotHasKey( 'DEFAULT_FETCH_MODE', $tmp_result ); |
| 560 |
|
|
| 561 |
|
$instance->disConnect(); |
| 562 |
|
unset( $instance ); |
| 563 |
|
} |
| 564 |
|
|
| 565 |
|
/** |
| 566 |
|
* test_getAttribute_ORACLE_NULLS() |
|
@@ 570-602 (lines=33) @@
|
| 567 |
|
* |
| 568 |
|
* getAttribute()のテスト(引数"ORACLE_NULLS"指定時) |
| 569 |
|
*/ |
| 570 |
|
public function test_getAttribute_ORACLE_NULLS() |
| 571 |
|
{ |
| 572 |
|
$params = [ |
| 573 |
|
"driver" => $GLOBALS[ 'DB_DRIVER' ], |
| 574 |
|
"user" => $GLOBALS[ 'DB_USER' ], |
| 575 |
|
"pass" => $GLOBALS[ 'DB_PASSWORD' ], |
| 576 |
|
"dbname" => $GLOBALS[ 'DB_DBNAME' ], |
| 577 |
|
"host" => $GLOBALS[ 'DB_HOST' ], |
| 578 |
|
"persistent" => false, |
| 579 |
|
]; |
| 580 |
|
|
| 581 |
|
$instance = new Db; |
| 582 |
|
$instance->connect( $params ); |
| 583 |
|
$tmp_result = $instance->getAttribute( 'ORACLE_NULLS' ); |
| 584 |
|
|
| 585 |
|
$this->assertArrayNotHasKey( 'AUTOCOMMIT', $tmp_result ); |
| 586 |
|
$this->assertArrayNotHasKey( 'PREFETCH', $tmp_result ); |
| 587 |
|
$this->assertArrayNotHasKey( 'TIMEOUT', $tmp_result ); |
| 588 |
|
$this->assertArrayNotHasKey( 'ERRMODE', $tmp_result ); |
| 589 |
|
$this->assertArrayNotHasKey( 'SERVER_VERSION', $tmp_result ); |
| 590 |
|
$this->assertArrayNotHasKey( 'CLIENT_VERSION', $tmp_result ); |
| 591 |
|
$this->assertArrayNotHasKey( 'SERVER_INFO', $tmp_result ); |
| 592 |
|
$this->assertArrayNotHasKey( 'CONNECTION_STATUS', $tmp_result ); |
| 593 |
|
$this->assertArrayNotHasKey( 'CASE', $tmp_result ); |
| 594 |
|
$this->assertArrayNotHasKey( 'DRIVER_NAME', $tmp_result ); |
| 595 |
|
$this->assertArrayHasKey( 'ORACLE_NULLS', $tmp_result ); |
| 596 |
|
$this->assertArrayNotHasKey( 'PERSISTENT', $tmp_result ); |
| 597 |
|
$this->assertArrayNotHasKey( 'STATEMENT_CLASS', $tmp_result ); |
| 598 |
|
$this->assertArrayNotHasKey( 'DEFAULT_FETCH_MODE', $tmp_result ); |
| 599 |
|
|
| 600 |
|
$instance->disConnect(); |
| 601 |
|
unset( $instance ); |
| 602 |
|
} |
| 603 |
|
|
| 604 |
|
/** |
| 605 |
|
* test_getAttribute_PERSISTENT() |
|
@@ 609-641 (lines=33) @@
|
| 606 |
|
* |
| 607 |
|
* getAttribute()のテスト(引数"PERSISTENT"指定時) |
| 608 |
|
*/ |
| 609 |
|
public function test_getAttribute_PERSISTENT() |
| 610 |
|
{ |
| 611 |
|
$params = [ |
| 612 |
|
"driver" => $GLOBALS[ 'DB_DRIVER' ], |
| 613 |
|
"user" => $GLOBALS[ 'DB_USER' ], |
| 614 |
|
"pass" => $GLOBALS[ 'DB_PASSWORD' ], |
| 615 |
|
"dbname" => $GLOBALS[ 'DB_DBNAME' ], |
| 616 |
|
"host" => $GLOBALS[ 'DB_HOST' ], |
| 617 |
|
"persistent" => false, |
| 618 |
|
]; |
| 619 |
|
|
| 620 |
|
$instance = new Db; |
| 621 |
|
$instance->connect( $params ); |
| 622 |
|
$tmp_result = $instance->getAttribute( 'PERSISTENT' ); |
| 623 |
|
|
| 624 |
|
$this->assertArrayNotHasKey( 'AUTOCOMMIT', $tmp_result ); |
| 625 |
|
$this->assertArrayNotHasKey( 'PREFETCH', $tmp_result ); |
| 626 |
|
$this->assertArrayNotHasKey( 'TIMEOUT', $tmp_result ); |
| 627 |
|
$this->assertArrayNotHasKey( 'ERRMODE', $tmp_result ); |
| 628 |
|
$this->assertArrayNotHasKey( 'SERVER_VERSION', $tmp_result ); |
| 629 |
|
$this->assertArrayNotHasKey( 'CLIENT_VERSION', $tmp_result ); |
| 630 |
|
$this->assertArrayNotHasKey( 'SERVER_INFO', $tmp_result ); |
| 631 |
|
$this->assertArrayNotHasKey( 'CONNECTION_STATUS', $tmp_result ); |
| 632 |
|
$this->assertArrayNotHasKey( 'CASE', $tmp_result ); |
| 633 |
|
$this->assertArrayNotHasKey( 'DRIVER_NAME', $tmp_result ); |
| 634 |
|
$this->assertArrayNotHasKey( 'ORACLE_NULLS', $tmp_result ); |
| 635 |
|
$this->assertArrayHasKey( 'PERSISTENT', $tmp_result ); |
| 636 |
|
$this->assertArrayNotHasKey( 'STATEMENT_CLASS', $tmp_result ); |
| 637 |
|
$this->assertArrayNotHasKey( 'DEFAULT_FETCH_MODE', $tmp_result ); |
| 638 |
|
|
| 639 |
|
$instance->disConnect(); |
| 640 |
|
unset( $instance ); |
| 641 |
|
} |
| 642 |
|
|
| 643 |
|
/** |
| 644 |
|
* test_getAttribute_STATEMENT_CLASS() |
|
@@ 648-680 (lines=33) @@
|
| 645 |
|
* |
| 646 |
|
* getAttribute()のテスト(引数"STATEMENT_CLASS"指定時) |
| 647 |
|
*/ |
| 648 |
|
public function test_getAttribute_STATEMENT_CLASS() |
| 649 |
|
{ |
| 650 |
|
$params = [ |
| 651 |
|
"driver" => $GLOBALS[ 'DB_DRIVER' ], |
| 652 |
|
"user" => $GLOBALS[ 'DB_USER' ], |
| 653 |
|
"pass" => $GLOBALS[ 'DB_PASSWORD' ], |
| 654 |
|
"dbname" => $GLOBALS[ 'DB_DBNAME' ], |
| 655 |
|
"host" => $GLOBALS[ 'DB_HOST' ], |
| 656 |
|
"persistent" => false, |
| 657 |
|
]; |
| 658 |
|
|
| 659 |
|
$instance = new Db; |
| 660 |
|
$instance->connect( $params ); |
| 661 |
|
$tmp_result = $instance->getAttribute( 'STATEMENT_CLASS' ); |
| 662 |
|
|
| 663 |
|
$this->assertArrayNotHasKey( 'AUTOCOMMIT', $tmp_result ); |
| 664 |
|
$this->assertArrayNotHasKey( 'PREFETCH', $tmp_result ); |
| 665 |
|
$this->assertArrayNotHasKey( 'TIMEOUT', $tmp_result ); |
| 666 |
|
$this->assertArrayNotHasKey( 'ERRMODE', $tmp_result ); |
| 667 |
|
$this->assertArrayNotHasKey( 'SERVER_VERSION', $tmp_result ); |
| 668 |
|
$this->assertArrayNotHasKey( 'CLIENT_VERSION', $tmp_result ); |
| 669 |
|
$this->assertArrayNotHasKey( 'SERVER_INFO', $tmp_result ); |
| 670 |
|
$this->assertArrayNotHasKey( 'CONNECTION_STATUS', $tmp_result ); |
| 671 |
|
$this->assertArrayNotHasKey( 'CASE', $tmp_result ); |
| 672 |
|
$this->assertArrayNotHasKey( 'DRIVER_NAME', $tmp_result ); |
| 673 |
|
$this->assertArrayNotHasKey( 'ORACLE_NULLS', $tmp_result ); |
| 674 |
|
$this->assertArrayNotHasKey( 'PERSISTENT', $tmp_result ); |
| 675 |
|
$this->assertArrayHasKey( 'STATEMENT_CLASS', $tmp_result ); |
| 676 |
|
$this->assertArrayNotHasKey( 'DEFAULT_FETCH_MODE', $tmp_result ); |
| 677 |
|
|
| 678 |
|
$instance->disConnect(); |
| 679 |
|
unset( $instance ); |
| 680 |
|
} |
| 681 |
|
|
| 682 |
|
/** |
| 683 |
|
* test_getAttribute_DEFAULT_FETCH_MODE() |
|
@@ 687-719 (lines=33) @@
|
| 684 |
|
* |
| 685 |
|
* getAttribute()のテスト(引数"DEFAULT_FETCH_MODE"指定時) |
| 686 |
|
*/ |
| 687 |
|
public function test_getAttribute_DEFAULT_FETCH_MODE() |
| 688 |
|
{ |
| 689 |
|
$params = [ |
| 690 |
|
"driver" => $GLOBALS[ 'DB_DRIVER' ], |
| 691 |
|
"user" => $GLOBALS[ 'DB_USER' ], |
| 692 |
|
"pass" => $GLOBALS[ 'DB_PASSWORD' ], |
| 693 |
|
"dbname" => $GLOBALS[ 'DB_DBNAME' ], |
| 694 |
|
"host" => $GLOBALS[ 'DB_HOST' ], |
| 695 |
|
"persistent" => false, |
| 696 |
|
]; |
| 697 |
|
|
| 698 |
|
$instance = new Db; |
| 699 |
|
$instance->connect( $params ); |
| 700 |
|
$tmp_result = $instance->getAttribute( 'DEFAULT_FETCH_MODE' ); |
| 701 |
|
|
| 702 |
|
$this->assertArrayNotHasKey( 'AUTOCOMMIT', $tmp_result ); |
| 703 |
|
$this->assertArrayNotHasKey( 'PREFETCH', $tmp_result ); |
| 704 |
|
$this->assertArrayNotHasKey( 'TIMEOUT', $tmp_result ); |
| 705 |
|
$this->assertArrayNotHasKey( 'ERRMODE', $tmp_result ); |
| 706 |
|
$this->assertArrayNotHasKey( 'SERVER_VERSION', $tmp_result ); |
| 707 |
|
$this->assertArrayNotHasKey( 'CLIENT_VERSION', $tmp_result ); |
| 708 |
|
$this->assertArrayNotHasKey( 'SERVER_INFO', $tmp_result ); |
| 709 |
|
$this->assertArrayNotHasKey( 'CONNECTION_STATUS', $tmp_result ); |
| 710 |
|
$this->assertArrayNotHasKey( 'CASE', $tmp_result ); |
| 711 |
|
$this->assertArrayNotHasKey( 'DRIVER_NAME', $tmp_result ); |
| 712 |
|
$this->assertArrayNotHasKey( 'ORACLE_NULLS', $tmp_result ); |
| 713 |
|
$this->assertArrayNotHasKey( 'PERSISTENT', $tmp_result ); |
| 714 |
|
$this->assertArrayNotHasKey( 'STATEMENT_CLASS', $tmp_result ); |
| 715 |
|
$this->assertArrayHasKey( 'DEFAULT_FETCH_MODE', $tmp_result ); |
| 716 |
|
|
| 717 |
|
$instance->disConnect(); |
| 718 |
|
unset( $instance ); |
| 719 |
|
} |
| 720 |
|
} |