mysqliLoadedTest.php (835B)
1 <?php 2 require_once ('tests/mysqliLoadedTest.php'); 3 class mysqliLoadedTest extends PHPUnit_Framework_TestCase 4 { 5 public function testForMysqli() 6 { 7 if (!extension_loaded('mysqli')) { 8 $this->markTestSkipped('[mysqliLoadedTest]->[testForMysqli()]: The MySQLi extension is not available'); 9 } 10 } 11 12 /** 13 * @depends testForMysqli 14 */ 15 public function testDBConnection() 16 { 17 $mysqli = new mysqli("localhost","root","","RPICMS"); 18 // Check connection 19 if ($mysqli->connect_errno > 0) 20 { 21 $this->markTestSkipped($mysqli->connect_error()); 22 } 23 } 24 25 /** 26 * @depends testForMysqli 27 * @depends testDBConnection 28 */ 29 public function testCreateTestingTables() 30 { 31 $mysqli = new mysqli("localhost","root","","RPICMS"); 32 33 34 35 36 } 37 } 38 ?>