Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Unit Tests for App not running
  • Hi again,
    I'm using a totally clean install of Fuel and I'm trying to create a really simple Unit Test for the default Welcome Controller. I created the "fuel/app/tests" directory and my file is called "fuel/app/tests/welcome.php" My test class looks like this:
    class Test_Controller_Welcome extends TestCase {
    
     public function test_fubar(){
      $this->assertEquals("fubar", "fubar");
     }
     
    }
    

    And i'm trying to run the test using the following:
    php oil test --group=app
    

    However, I'm just getting the following:
    ?[30;42m?[2KOK (0 tests, 0 assertions)
    ?[0m?[2K
    

    Is there something I'm doing wrong?
  • I'm working with Darren on this issue. I've found that removing the core and packages test suites from phpunit.xml and running:
    php oil tests
    
    without a group works. However, running
    php oil tests --group=app
    
    or
    php oil tests --group=App
    
    and the test wont run.
  • Sorry, I also forgot to mention, that running the Core group works - but it runs all tests:
    php oil test --group=Core
    
    performs the same as running :
    php oil t
    
  • Sorry, my understanding of --group was faulty.
    I assumed that --group was running a test suite specified within the phpunit.xml config, however this is not the case.
    I supplied @group within my doc block and the test runs fine. Apologies for my utter donkeyness...

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion