]>
src.bluestatic.org Git - isso.git/blob - docs/UnitTest/DatabaseMySQLTest.php
3 require_once 'PHPUnit/Framework.php';
4 require_once 'DatabaseTestAbstract.php';
6 class DatabaseMySQLTest
extends DatabaseTestAbstract
8 public function setUp()
10 require_once 'tests.config.php';
11 require_once 'ISSO/Register.php';
13 $this->fixture
= BSRegister
::LoadModule('DbMySql');
14 $this->fixture
->connect(TEST_DB_MYSQL_HOST
, TEST_DB_MYSQL_USER
, TEST_DB_MYSQL_PASSWORD
, TEST_DB_MYSQL_DATABASE
);
15 $this->fixture
->query("
18 id int auto_increment,
19 textstuff varchar(255),
25 public function tearDown()
27 $this->fixture
->query("DROP TABLE test");
28 $this->fixture
= null;
31 public function testConnect()
35 BSRegister
::LoadModule('DbMySql')->connect('localhost', '--invalid user--', '--invalid password--', '--nodatabase--');
36 $this->fail('exception expected');
38 catch (BSDbException
$e)