Did you install the integrated package or you are using the dev version (5.1)?
May 24, 2015
6
Level 7
visit() and see() and all that not working
I decided to start doing tests to make my life easier, but I'm having one problem: Stuff like
$this->visit("/")->see("Laravel 5")
is not working. This is the error I get:
PHPUnit 4.6.6 by Sebastian Bergmann and contributors.
Configuration read from /var/www/booksite/phpunit.xml
PHP Fatal error: Call to undefined method AuthTest::visit() in /var/www/booksite/tests/AuthTest.php on line 15
[Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined method AuthTest::visit()
My test:
<?php
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class AuthTest extends TestCase
{
/**
* A basic functional test example.
*
* @return void
*/
public function testBasicExample()
{
$this->visit('/')
->see('Laravel 5');
}
}
(The name AuthTest is for something else, I just want to get this working.)
Any idea what's going on?
Level 53
Yeah, you have to set it up :) Jeffrey covers the package in the series called Intuitive Integration Testing.
4 likes
Please or to participate in this conversation.