PHPUnit getting started

Posted 4 years ago by theUnforgiven

Based on my contributions/questions earlier today, I've decided I'm going to do some Unit Testing, but come across my first stumbling block!

When I run phpunit from the terminal I get the following error:

lee$ phpunit
PHPUnit 4.5.0 by Sebastian Bergmann and contributors.

Configuration read from /Users/lee/code/l5blog/phpunit.xml

PHP Fatal error:  Call to a member function make() on a non-object in /Users/lee/.composer/vendor/illuminate/support/Illuminate/Support/helpers.php on line 33

Fatal error: Call to a member function make() on a non-object in /Users/lee/.composer/vendor/illuminate/support/Illuminate/Support/helpers.php on line 33

Anyone know what's wrong & how I can fix?

I have one test that comes out of the box with L5

class ExampleTest extends TestCase {

    /**
     * A basic functional test example.
     *
     * @return void
     */
    public function testBasicExample()
    {
        $response = $this->call('GET', '/');

        $this->assertEquals(200, $response->getStatusCode());
    }

}

@blackbird

Please sign in or create an account to participate in this conversation.