Can you please help me solve this issue on my local homestead/vagrant machine?
When I run the command: PHPUnit
I getting this result
PHPUnit 4.8.36 by Sebastian Bergmann and contributors.
E
Time: 1.97 seconds, Memory: 6.00MBThere was 1 error: 1) ExampleTest::testBasicExample
Cannot modify header information - headers already sent by (output started at /home/vagrant/Code/Project/vendor/php unit/phpunit/src/Util/Printer.php:134)
/home/vagrant/Code/Project/bootstrap/app.php:4
/home/vagrant/Code/Poptin/tests/TestCase.php:20
/home/vagrant/Code/Project/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:85 /home/vagrant/Code/Project/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:64
Please help! I've tried everything!!!
TestCase File
<?php
class TestCase extends Illuminate\Foundation\Testing\TestCase
{
/**
* The base URL to use while testing the application.
*
* @var string
*/
//protected $baseUrl = 'http://localhost';
protected $baseUrl = 'http://192.168.10.10';
/**
* Creates the application.
*
* @return \Illuminate\Foundation\Application
*/
public function createApplication()
{
$app = require __DIR__.'/../bootstrap/app.php';
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
return $app;
}
}
ExampleTest File:
<?php
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class ExampleTest extends TestCase
{
/**
* A basic functional test example.
*
* @return void
*/
public function testBasicExample()
{
$this->visit('/login')
->see('password');
}
}