Tuesday, 15 April 2014

php - Make CakePHP use local PHPUnit & PHPUnit Selenium installed via Composer -



php - Make CakePHP use local PHPUnit & PHPUnit Selenium installed via Composer -

on computer have cakephp project. , within cakephp project have composer.json file below:

{ "name": "a/b", "description": "c", "require-dev": { "phpunit/phpunit": "3.7.*", "phpunit/phpunit-selenium": ">=1.2" }, "license": "proprietary", "authors": [ { "name": "d", "email": "e" } ], "minimum-stability": "f" }

after running composer install have phpunit , selenium bundle installed , working here

/cakephpproject/vendor/bin/phpunit /cakephpproject/vendor/phpunit/phpunit-selenium

now /cakephpproject/app/ tried run next command

../vendor/bin/phpunit test/case/controller/mycontrollertest

but receiving next error message

fatal error: class 'app' not found...

if utilize ./console/cake test app controller/granulescontroller test effort run throws phpunit_extensions_selenium2testcase not found error since on scheme phpunit selenium not installed.

how create cakephp utilize phpunit & phpunit-selenium installed using composer , not utilize phpunit installed globally?

the next command seems executing phpunit & phpunit-selenium2 installed using composer.

./console/cake test app allcontrollers --bootstrap ../vendor/autoload.php

php cakephp selenium phpunit

No comments:

Post a Comment