laravel 4 unit test

1.install PHPUnit, add the following line to your composer.json file

  "require": {
    "laravel/framework": "4.1.*",
    "phpunit/phpunit": "3.7.*"
} the composer update command to install the package:

composer update

3.Now that you have PHPUnit installed, you can run automated tests from the command line. Laravel comes with one example test already set up. To make sure you have PHPUnit correctly set up, run the following command from Terminal and check vender/bin/phpunit is appear:


4.You should get the following line returned if everything went ok:

OK (1 test, 2 assertions)


Related posts:

This entry was posted in laravel4. Bookmark the permalink.