]>
src.bluestatic.org Git - isso.git/blob - UnitTest/DatabaseMySQLiTest.php
3 require_once 'PHPUnit/Framework.php';
4 require_once 'DatabaseTestAbstract.php';
6 class DatabaseMySQLiTest
extends DatabaseTestAbstract
8 public function setUp()
10 require_once 'tests.config.php';
11 require_once ISSO
. '/App.php';
12 require_once ISSO
. '/DbMySqlI.php';
14 $this->fixture
= new BSDbMySqlI();
15 $this->fixture
->connect(TEST_DB_MYSQL_HOST
, TEST_DB_MYSQL_USER
, TEST_DB_MYSQL_PASSWORD
, TEST_DB_MYSQL_DATABASE
);
16 $this->fixture
->query("
19 id int auto_increment,
20 textstuff varchar(255),
26 public function tearDown()
28 $this->fixture
->query("DROP TABLE test");
29 $this->fixture
= null;
32 public function testConnect()
36 $test = new BSDbMySqlI();
37 $test->connect('localhost', '--invalid user--', '--invalid password--', '--nodatabase--');
38 $this->fail('exception expected');
40 catch (BSDbException
$e)