summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBjörn Geiger2011-06-25 16:35:35 +0200
committerBjörn Geiger2011-06-25 16:35:35 +0200
commitb92142fb247cf9e3f090f233354d8fca26be8133 (patch)
tree086bd7af6cad5c9f12004b138d68de5a3d97c31c /tests
parentZend Application hinzugefügt (diff)
downloadpoolctrl-b92142fb247cf9e3f090f233354d8fca26be8133.tar.gz
poolctrl-b92142fb247cf9e3f090f233354d8fca26be8133.tar.xz
poolctrl-b92142fb247cf9e3f090f233354d8fca26be8133.zip
Zend Application hinzugefügt
Diffstat (limited to 'tests')
-rw-r--r--tests/application/controllers/IndexControllerTest.php14
-rw-r--r--tests/bootstrap.php18
-rw-r--r--tests/phpunit.xml17
3 files changed, 49 insertions, 0 deletions
diff --git a/tests/application/controllers/IndexControllerTest.php b/tests/application/controllers/IndexControllerTest.php
new file mode 100644
index 0000000..b63670f
--- /dev/null
+++ b/tests/application/controllers/IndexControllerTest.php
@@ -0,0 +1,14 @@
+<?php
+
+class IndexControllerTest extends Zend_Test_PHPUnit_ControllerTestCase
+{
+
+ public function setUp()
+ {
+ $this->bootstrap = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
+ parent::setUp();
+ }
+
+
+}
+
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
new file mode 100644
index 0000000..7022b5c
--- /dev/null
+++ b/tests/bootstrap.php
@@ -0,0 +1,18 @@
+<?php
+
+// Define path to application directory
+defined('APPLICATION_PATH')
+ || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
+
+// Define application environment
+defined('APPLICATION_ENV')
+ || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'testing'));
+
+// Ensure library/ is on include_path
+set_include_path(implode(PATH_SEPARATOR, array(
+ realpath(APPLICATION_PATH . '/../library'),
+ get_include_path(),
+)));
+
+require_once 'Zend/Loader/Autoloader.php';
+Zend_Loader_Autoloader::getInstance();
diff --git a/tests/phpunit.xml b/tests/phpunit.xml
new file mode 100644
index 0000000..75dc6ed
--- /dev/null
+++ b/tests/phpunit.xml
@@ -0,0 +1,17 @@
+<phpunit bootstrap="./bootstrap.php">
+ <testsuite name="Application Test Suite">
+ <directory>./application</directory>
+ </testsuite>
+ <testsuite name="Library Test Suite">
+ <directory>./library</directory>
+ </testsuite>
+
+ <filter>
+ <!-- If Zend Framework is inside your project's library, uncomment this filter -->
+ <!--
+ <whitelist>
+ <directory suffix=".php">../../library/Zend</directory>
+ </whitelist>
+ -->
+ </filter>
+</phpunit>