From 43233000543984eda49768edde65076fb9c2468c Mon Sep 17 00:00:00 2001 From: ctrlaltca <> Date: Sun, 18 Nov 2012 20:26:25 +0000 Subject: dropped old tests referring to unexisting components (NOTE: this includes what seems a test suite for an older version of SQLMap) --- tests/unit/SQLMap/TAdodbConnectionTestCase.php | 64 -------------------------- 1 file changed, 64 deletions(-) delete mode 100644 tests/unit/SQLMap/TAdodbConnectionTestCase.php (limited to 'tests/unit/SQLMap/TAdodbConnectionTestCase.php') diff --git a/tests/unit/SQLMap/TAdodbConnectionTestCase.php b/tests/unit/SQLMap/TAdodbConnectionTestCase.php deleted file mode 100644 index 7d566386..00000000 --- a/tests/unit/SQLMap/TAdodbConnectionTestCase.php +++ /dev/null @@ -1,64 +0,0 @@ -db_file = dirname(__FILE__).'/resources/test.db'; - copy($file,$this->db_file); - $provider = new TAdodb(); - } - - function getDsn() - { - return 'sqlite://'.urlencode(realpath($this->db_file)); - } - - function testProviderCreation() - { - $provider = new TAdodb(); - $connection = $provider->getConnection(); - $this->assertTrue($connection instanceof TAdodbConnection); - try - { - $connection->open(); - $this->fail(); - } - catch (TDbConnectionException $e) - { - $this->pass(); - } - } - - - - function testAdodbSqliteConnection() - { - $connection = new TAdodbConnection($this->getDsn()); - $this->assertTrue($connection->open()); - - $statement = "insert into person(per_id, per_first_name, - per_last_name, per_birth_date, per_weight_kg, per_height_m) - values(?, ?, ?, ?, ?, ?)"; - $sql = $connection->prepare($statement); - $connection->execute($sql, - array(2,'mini','me','2000-01-01', 50.5, 145.5)); - - $statement = "select * from person"; - $results = $connection->execute($statement); - $this->assertEquals($results->RecordCount(), 2); - - } -} - -?> \ No newline at end of file -- cgit v1.2.3