a tiny mvc framework for php using php-activerecord
1<?php
2include 'helpers/config.php';
3require_once dirname(__FILE__) . '/../lib/adapters/SqliteAdapter.php';
4
5class SqliteAdapterTest extends AdapterTest
6{
7 public function setUp($connection_name=null)
8 {
9 parent::setUp('sqlite');
10 }
11
12 public function tearDown()
13 {
14 parent::tearDown();
15
16 @unlink($this->db);
17 @unlink(self::InvalidDb);
18 }
19
20 public function testConnectToInvalidDatabaseShouldNotCreateDbFile()
21 {
22 try
23 {
24 ActiveRecord\Connection::instance("sqlite://" . self::InvalidDb);
25 $this->assertFalse(true);
26 }
27 catch (ActiveRecord\DatabaseException $e)
28 {
29 $this->assertFalse(file_exists(dirname(__FILE__) . "/" . self::InvalidDb));
30 }
31 }
32
33 // not supported
34 public function testCompositeKey() {}
35 public function testConnectWithPort() {}
36}
37?>