Permalink
Browse files

added phpunit to composer and tests updated

  • Loading branch information...
1 parent e715471 commit 83ffddc800430b627f52d0dac90daa8ae898a93f @tamtamchik tamtamchik committed Apr 22, 2015
View
@@ -0,0 +1,6 @@
+composer.phar
+vendor/
+
+# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file
+# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
+composer.lock
View
@@ -16,5 +16,8 @@
},
"autoload": {
"files": [ "flight/autoload.php", "flight/Flight.php" ]
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.6"
}
}
@@ -6,7 +6,7 @@
* @license MIT, http://flightphp.com/license
*/
-require_once 'PHPUnit/Autoload.php';
+require_once 'vendor/autoload.php';
require_once __DIR__.'/../flight/autoload.php';
class AutoloadTest extends PHPUnit_Framework_TestCase
@@ -15,7 +15,7 @@ class AutoloadTest extends PHPUnit_Framework_TestCase
* @var \flight\Engine
*/
private $app;
-
+
function setUp() {
$this->app = new \flight\Engine();
$this->app->path(__DIR__.'/classes');
@@ -6,7 +6,7 @@
* @license MIT, http://flightphp.com/license
*/
-require_once 'PHPUnit/Autoload.php';
+require_once 'vendor/autoload.php';
require_once __DIR__.'/classes/Hello.php';
class DispatcherTest extends PHPUnit_Framework_TestCase
@@ -6,7 +6,7 @@
* @license MIT, http://flightphp.com/license
*/
-require_once 'PHPUnit/Autoload.php';
+require_once 'vendor/autoload.php';
require_once __DIR__.'/../flight/autoload.php';
class FilterTest extends PHPUnit_Framework_TestCase
@@ -6,7 +6,7 @@
* @license MIT, http://flightphp.com/license
*/
-require_once 'PHPUnit/Autoload.php';
+require_once 'vendor/autoload.php';
require_once __DIR__.'/../flight/Flight.php';
class FlightTest extends PHPUnit_Framework_TestCase
@@ -6,7 +6,7 @@
* @license MIT, http://flightphp.com/license
*/
-require_once 'PHPUnit/Autoload.php';
+require_once 'vendor/autoload.php';
require_once __DIR__.'/classes/User.php';
require_once __DIR__.'/classes/Factory.php';
View
@@ -6,7 +6,7 @@
* @license MIT, http://flightphp.com/license
*/
-require_once 'PHPUnit/Autoload.php';
+require_once 'vendor/autoload.php';
require_once __DIR__.'/../flight/autoload.php';
require_once __DIR__.'/classes/Hello.php';
View
@@ -4,6 +4,7 @@ This directory contains unit tests for Flight. The tests were written for PHPUni
To run the tests do:
- phpunit tests
+ composer install
+ vendor/bin/phpunit tests
-Learn more about PHPUnit at [http://www.phpunit.de](http://www.phpunit.de/manual/current/en/index.html)
+Learn more about PHPUnit at [http://www.phpunit.de](http://www.phpunit.de/manual/current/en/index.html)
@@ -6,7 +6,7 @@
* @license MIT, http://flightphp.com/license
*/
-require_once 'PHPUnit/Autoload.php';
+require_once 'vendor/autoload.php';
require_once __DIR__.'/../flight/autoload.php';
class RedirectTest extends PHPUnit_Framework_TestCase
@@ -6,7 +6,7 @@
* @license MIT, http://flightphp.com/license
*/
-require_once 'PHPUnit/Autoload.php';
+require_once 'vendor/autoload.php';
require_once __DIR__.'/../flight/autoload.php';
require_once __DIR__.'/classes/User.php';
@@ -84,4 +84,4 @@ function testMapOverridesRegister(){
$this->assertEquals(123, $user);
}
-}
+}
@@ -6,7 +6,7 @@
* @license MIT, http://flightphp.com/license
*/
-require_once 'PHPUnit/Autoload.php';
+require_once 'vendor/autoload.php';
require_once __DIR__.'/../flight/Flight.php';
class RenderTest extends PHPUnit_Framework_TestCase
@@ -6,7 +6,7 @@
* @license MIT, http://flightphp.com/license
*/
-require_once 'PHPUnit/Autoload.php';
+require_once 'vendor/autoload.php';
require_once __DIR__.'/../flight/autoload.php';
class RequestTest extends PHPUnit_Framework_TestCase
@@ -6,7 +6,7 @@
* @license MIT, http://flightphp.com/license
*/
-require_once 'PHPUnit/Autoload.php';
+require_once 'vendor/autoload.php';
require_once __DIR__.'/../flight/autoload.php';
class RouterTest extends PHPUnit_Framework_TestCase
@@ -20,7 +20,7 @@ class RouterTest extends PHPUnit_Framework_TestCase
* @var \flight\net\Request
*/
private $request;
-
+
function setUp(){
$this->router = new \flight\net\Router();
$this->request = new \flight\net\Request();
@@ -6,7 +6,7 @@
* @license MIT, http://flightphp.com/license
*/
-require_once 'PHPUnit/Autoload.php';
+require_once 'vendor/autoload.php';
require_once __DIR__.'/../flight/autoload.php';
class VariableTest extends PHPUnit_Framework_TestCase
View
@@ -6,7 +6,7 @@
* @license MIT, http://flightphp.com/license
*/
-require_once 'PHPUnit/Autoload.php';
+require_once 'vendor/autoload.php';
require_once __DIR__.'/../flight/autoload.php';
class ViewTest extends PHPUnit_Framework_TestCase

0 comments on commit 83ffddc

Please sign in to comment.