-1

I have a docker container with laravel environment , and I need to install Behat inside to run features and i need to run PHPunit tests.

Any suggestion how to do it?

UPDATED:

I have this environment Dockervel : http://www.spiralout.eu/2015/12/dockervel-laravel-development.html

I have to do some application whit BDD done in Behat and also I need to do some unit testing. I have to deliver this application via Docker image.

I have wrote the application in dockervel ,it's pretty simple one ,but still need to add behat and to make a Dockerfile so I can make an image.

moonlight
  • 451
  • 1
  • 5
  • 12

1 Answers1

0

Run composer install behat/behat in your application code container and run the commands like any other php / laravel package.

I don't think that adding a separate container just for testing / behat / phpunit is really anything better than having them all in the same container.

On the other hand, NodeJS and npm in a separate container would be a smart choice in some cases.

Davor Minchorov
  • 1,878
  • 1
  • 12
  • 18
  • I've updated mz question. You think that whit your solution when I deliver my above mentioned docker image ,will ensure that the one that uses this image can run behat , or should I recommend them to do this ** Run composer install behat/behat in your application code container and run the commands like any other php / laravel package. ** in order to run behat ? – moonlight Jun 25 '16 at 12:14
  • Behat is just a package for PHP, it's nothing more. I don't think it's really a smart idea to have multiple php containers with composer, just to run each php package. Maybe you are overthinking it. It's gonna be easier for you and your team to use the same container for all php and laravel packages. I can't think of a case where behat being on a different container (or any other php package) would help you and how it would help you. – Davor Minchorov Jun 25 '16 at 12:30
  • Thanks , it made clear a lot of things for me, I've clearly overthought it! – moonlight Jun 25 '16 at 12:42