Laravel Unit Testing - Run All Tests
laravel, laravel-4, phpunit
Solution
Your tests need to finish with ...Test.php to run automatically. So change
app/tests/TestCreateEvent.php
to
app/tests/CreateEventTest.php
and it should work.
Also make sure you rename the model inside the test to `"class CreateEventTest extends TestCase"`
Problem
I'm pretty new to both Laravel and PHPUnit, and I'm using Laravel 4 on Ubuntu 12.04. When I run `phpunit` from my project's home directory, it runs the ExampleTest.php test that comes with Laravel. I created my own sample test (exactly like their example and in the same directory, only the file and test are renamed and do something different), and ran `phpunit` again like before; but it still only ran ExampleTest.php--not my created test. But if I run `phpunit path/to/myTest`, it runs my test just fine. So I feel like this is a dumb question, but how do I run all of the tests with one command (I thought `phpunit` should've done that)? Thanks for the help!