ao-pack
ao-pack

Reputation: 27

Yii2 Testing error while codeception run command is issued

I've got a test suite in yii2 that I would like to run, I have installed composer, codeception, built the test with 'codecept build' and so far so good, everything was smooth as butter until I've issued the command 'codecept run'; it throws an error which by any means I have tried to figured out unfortunately unsuccessfully. I have reinstalled composer, clear the composer cache, rebuilt the project again with codecept build but not success whatsoever.

The error is as follows:

 MyApp\tests.functional Tests (4) -----------------------------------------------------------------
- HomeCest: Check open<pre>PHP User Error &#039;yii\base\ErrorException&#039; with message &#039;Exception &#039;yii\base\InvalidParamException&#039; with message &#039;The file or directory to be published does not exist: /home/user/GIT_MyApp/yii/myapp/vendor/bower/jquery/dist&#039; 

in /home/user/GIT_MyApp/yii/vendor/yiisoft/yii2/web/AssetManager.php:453

Stack trace:
#0 /home/user/GIT_MyApp/yii/vendor/yiisoft/yii2/web/AssetBundle.php(185): yii\web\AssetManager-&gt;publish(&#039;/home/angelo/GI...&#039;, Array)
#1 /home/user/GIT_MyApp/yii/vendor/yiisoft/yii2/web/AssetManager.php(268): yii\web\AssetBundle-&gt;publish(Object(yii\web\AssetManager))
#2 

/home/user/GIT_MyApp/yii/vendor/yiisoft/yii2/web/AssetManager.php(239): yii\web\AssetManager-&gt;loadBundle(&#039;yii\\web\\JqueryA...&#039;, Array, true) 
.....
.....

The weirdest thing though, is that the same project runs fine in another machine (CENT OS). Mine is Kubuntu 16.04. Could it be the machine? Could someone please tell me what is happening and why this error keeps on coming?

Upvotes: 0

Views: 261

Answers (1)

Naktibalda
Naktibalda

Reputation: 14102

You have to install fxp/composer-asset-plugin with composer globally:
composer global require "fxp/composer-asset-plugin:~1.3.1"

Like here: https://github.com/yiisoft/yii2-app-basic/blob/2.0.12/.travis.yml#L20

Upvotes: 0

Related Questions