summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid <ottodavid@gmx.net>2014-08-05 23:02:07 +0200
committerDavid <ottodavid@gmx.net>2014-08-05 23:52:37 +0200
commitc8682f71ca510b63d67bcf5c28e29992bfed94f2 (patch)
tree4f31c79ccc80d475f47d3618d10cd51a3ee00e30 /tests
parentb682cf8ede7f60d770d39b1d48e6f15fd796774b (diff)
Fix System.Data test cases
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/Data/TDbCommandTest.php4
-rw-r--r--tests/unit/Data/TDbConnectionTest.php4
-rw-r--r--tests/unit/Data/TDbDataReaderTest.php4
-rw-r--r--tests/unit/Data/TDbTransactionTest.php4
-rw-r--r--tests/unit/Data/runtime/.gitignore2
5 files changed, 18 insertions, 0 deletions
diff --git a/tests/unit/Data/TDbCommandTest.php b/tests/unit/Data/TDbCommandTest.php
index 55d7d559..87bbbf05 100644
--- a/tests/unit/Data/TDbCommandTest.php
+++ b/tests/unit/Data/TDbCommandTest.php
@@ -15,6 +15,10 @@ class TDbCommandTest extends PHPUnit_Framework_TestCase
public function setUp()
{
@unlink(TEST_DB_FILE);
+
+ // create application just to provide application mode
+ new TApplication(__DIR__, false ,TApplication::CONFIG_TYPE_PHP);
+
$this->_connection=new TDbConnection('sqlite:'.TEST_DB_FILE);
$this->_connection->Active=true;
$this->_connection->createCommand('CREATE TABLE foo (id INTEGER NOT NULL PRIMARY KEY, name VARCHAR(8))')->execute();
diff --git a/tests/unit/Data/TDbConnectionTest.php b/tests/unit/Data/TDbConnectionTest.php
index e7e3ef74..4b32300c 100644
--- a/tests/unit/Data/TDbConnectionTest.php
+++ b/tests/unit/Data/TDbConnectionTest.php
@@ -19,6 +19,10 @@ class TDbConnectionTest extends PHPUnit_Framework_TestCase
{
@unlink(TEST_DB_FILE);
@unlink(TEST_DB_FILE2);
+
+ // create application just to provide application mode
+ new TApplication(__DIR__, false ,TApplication::CONFIG_TYPE_PHP);
+
$this->_connection1=new TDbConnection('sqlite:'.TEST_DB_FILE);
$this->_connection1->Active=true;
$this->_connection1->createCommand('CREATE TABLE foo (id INTEGER NOT NULL PRIMARY KEY, name VARCHAR(8))')->execute();
diff --git a/tests/unit/Data/TDbDataReaderTest.php b/tests/unit/Data/TDbDataReaderTest.php
index 0595f3e2..2e31245e 100644
--- a/tests/unit/Data/TDbDataReaderTest.php
+++ b/tests/unit/Data/TDbDataReaderTest.php
@@ -37,6 +37,10 @@ class TDbDataReaderTest extends PHPUnit_Framework_TestCase
public function setUp()
{
@unlink(TEST_DB_FILE);
+
+ // create application just to provide application mode
+ new TApplication(__DIR__, false ,TApplication::CONFIG_TYPE_PHP);
+
$this->_connection=new TDbConnection('sqlite:'.TEST_DB_FILE);
$this->_connection->Active=true;
$this->_connection->createCommand('CREATE TABLE foo (id INTEGER NOT NULL PRIMARY KEY, name VARCHAR(8))')->execute();
diff --git a/tests/unit/Data/TDbTransactionTest.php b/tests/unit/Data/TDbTransactionTest.php
index a901394d..b51fda04 100644
--- a/tests/unit/Data/TDbTransactionTest.php
+++ b/tests/unit/Data/TDbTransactionTest.php
@@ -15,6 +15,10 @@ class TDbTransactionTest extends PHPUnit_Framework_TestCase
public function setUp()
{
@unlink(TEST_DB_FILE);
+
+ // create application just to provide application mode
+ new TApplication(__DIR__, false ,TApplication::CONFIG_TYPE_PHP);
+
$this->_connection=new TDbConnection('sqlite:'.TEST_DB_FILE);
$this->_connection->Active=true;
$this->_connection->createCommand('CREATE TABLE foo (id INTEGER NOT NULL PRIMARY KEY, name VARCHAR(8))')->execute();
diff --git a/tests/unit/Data/runtime/.gitignore b/tests/unit/Data/runtime/.gitignore
new file mode 100644
index 00000000..d6b7ef32
--- /dev/null
+++ b/tests/unit/Data/runtime/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore