Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Issues with unit test(Phpunit)
  • Hi,
    I have some issues with phpunit!
    I install successfully phpunit in windows!
    When I do in commande line  "oil test", I get this message "PHPUnit does not appear to be install"
    How I can configure phpunit for fuelphp?
    Thank for some help!

  • Create an app/config/oil.php config file, and add

    return array(
        'phpunit' => array(
            'autoload_path' => 'you-phpunit-autoloader-here',
        ),
    );

    specifying the location of the PHPunit autoloader. (default that's "PHPUnit/Autoload.php").
  • thank you Harro!Now it work!
    I have another issues!
    How can I test my controllers?
    I got only tutoriel for model!
    Thanks for some helps!
  • Can't help you with that, I haven't written any tests for controllers yet. Maybe someone else?
  • Take a look at Behat, A behaviour driven development tool which is particularly well suited for testing the behaviour of your app so your controllers/views, using Selenium, for example.


    I will set it up and keep you posted on this.

    If you really want to test your controllers with PHPUnit I can't help you on this, and I don't think that it is the best tool to do that.

    Cheers

Howdy, Stranger!

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

In this Discussion