PHPUnit_TestCase($name); } function setUp() { require dirname(__FILE__) . '/_config.inc.php'; require_once '../lib/DBSessionHandler.inc.php'; session_write_close(); $this->DBSessionHandler = new DBSessionHandler($app->db, array( 'db_table' => 'session_tbl', 'create_table' => true, )); } function tearDown() { unset($this->DBSessionHandler); } function test_DBsessionopen() { $this->DBSessionHandler->DBsessionopen('', ''); } function test_DBsessionclose() { $this->DBSessionHandler->DBsessionclose(); } function test_DBsessionread() { $this->DBSessionHandler->DBsessionread(session_id()); } function test_DBsessionwrite() { $this->DBSessionHandler->DBsessionwrite(session_id(), serialize($_SESSION)); } function test_DBsessiondestroy() { $this->DBSessionHandler->DBsessiondestroy(session_id()); } function test_DBsessiongarbage() { $this->DBSessionHandler->DBsessiongarbage(0); } } // Running the test. $suite = new PHPUnit_TestSuite('DBSessionHandlerTest'); $result = PHPUnit::run($suite); echo $result->toString(); ?>