From 32ea48c7ba476b4a147dfd67dd7fc8b698234ff2 Mon Sep 17 00:00:00 2001 From: Alexander Kochetov Date: Mon, 30 Dec 2013 22:34:24 +0400 Subject: [PATCH] Actualize phpunit usage approach --- .gitignore | 4 +++- composer.json | 3 ++- tests/unit/TestCase.php | 5 ----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 5586ab2..52b1bac 100644 --- a/.gitignore +++ b/.gitignore @@ -16,12 +16,14 @@ Thumbs.db /vendor # composer itself is not needed -composer.phar +/composer.phar # composer.lock should not be committed as we always want the latest versions /composer.lock # Mac DS_Store Files .DS_Store +# phpunit itself is not needed +/phpunit.phar # local phpunit config /phpunit.xml diff --git a/composer.json b/composer.json index 3af7dd3..dfd4fbb 100644 --- a/composer.json +++ b/composer.json @@ -83,7 +83,8 @@ "ext-pdo_mysql": "*", "smarty/smarty": "*", "swiftmailer/swiftmailer": "*", - "twig/twig": "*" + "twig/twig": "*", + "phpunit/phpunit": "3.7.*" }, "suggest": { "twbs/bootstrap": "required by yii2-bootstrap, yii2-debug, yii2-gii extension", diff --git a/tests/unit/TestCase.php b/tests/unit/TestCase.php index c8e5731..147df05 100644 --- a/tests/unit/TestCase.php +++ b/tests/unit/TestCase.php @@ -2,11 +2,6 @@ namespace yiiunit; -require_once('PHPUnit/Runner/Version.php'); -spl_autoload_unregister(['Yii', 'autoload']); -require_once('PHPUnit/Autoload.php'); -spl_autoload_register(['Yii', 'autoload']); // put yii's autoloader at the end - /** * This is the base class for all yii framework unit tests. */