testing - Autoloading in Laravel Tests -


i'm trying start writing tests within laravel. think practice write own basic testcase, runs test setup (for example migrations).

<?php  class testcase extends phpunit_framework_testcase {     public function setup()     {         parent::setup();          // example:         db::table('categories')->first();     }  } 

after that, want inherit testcases 1 created above

<?php  class testexample extends testcase {     public function testsomethingistrue()     {         $this->asserttrue(true);         } } 

so have 3 problems:

  1. my testcase throws error, class db not found. why heck test not autoloading laravel framework classes?

  2. phpunit tells me (with warning) testcase not contain tests, suspected behaviour class, how can avoid message?

  3. my testexample cannot find class testcase.

can me understanding that?! how can configure test specific autoloading?

update: answer 1: because run tests in netbeans ide, needs configured! setting right phpunit.xml helped

as revealed in our discussion, when run phpunit tests using ide (netbeans, phpstrom , so), have make sure ide correctly configured catch phpunit.xml.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -