Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
[ASK]How to set up and use phpunit in fuelphp?
  • Hey Guys,

    i'm a newbie in fuelphp, i want to setup and use phpunit to test my code. 
    when i try to : 

    $php oil test

    it will show the message like this:

    Warning: require_once(/Applications/XAMPP/xamppfiles/htdocs/unishelf-webkeys.php): failed to open stream: No such file or directory in /Applications/XAMPP/xamppfiles/htdocs/unishelf-web/config.php on line 3

    Fatal error: require_once(): Failed opening required '/Applications/XAMPP/xamppfiles/htdocs/unishelf-webkeys.php' (include_path='.:') in /Applications/XAMPP/xamppfiles/htdocs/unishelf-web/config.php on line 3

    i also try another way, like i upgrade my composer. i add this code to my composer.json and then update it,

    {
        "require": {
            "aws/aws-sdk-php": "2.*",
    "squizlabs/php_codesniffer": "1.*"
        },
        "require-dev": {
    "phpunit/phpunit": "3.7.14"
        }, 
        "autoload": {
        "psr-0": {
    "phpUnitTutorial": ""
    }
        }
    }

    and after that type command like this below, but still got error with class input.

    $ ./vendor/bin/phpunit phpUnit/test/importdocumentsTest.php 
    Not definedPHPUnit 3.7.14 by Sebastian Bergmann.

    Fatal error: Class 'Input' not found in /Applications/XAMPP/xamppfiles/htdocs/unishelf-web/phpUnit/test/importdocumentsTest.php on line 20

    thank you.
  • How do you setup FuelPHP?

  • agstwn, did you set up fuel correctly? It seems that there's something weird with your install.

    Did you git clone the repo, use the web installer, or downloaded the zip from fuelphp.com?

Howdy, Stranger!

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

In this Discussion