for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Containers\Authentication\UI\WEB\Tests\Functional;
use App\Ship\Parents\Tests\PhpUnit\TestCase;
use App\Ship\Parents\Tests\PhpUnit\WebTestCase;
use Illuminate\Foundation\Testing\WithoutMiddleware;
/**
* Class UserLoginTest
*
* @author Johan Alvarez <[email protected]>
* @author Mahmoud Zalt <[email protected]>
*/
class ProtectedDashboardPage extends TestCase
{
//use WithoutMiddleware;
// overrides the default subDomain in the base URL
protected $subDomain = 'admin';
protected $endpoint = '/dashboard';
public function testProtectedDashboardRoute()
// go to the protected page, without login
$response = $this->get($this->endpoint);
// should be redirected to login page
$response->assertResponseStatus(302);
$this->assertRedirectedTo('login');
$this->see('login');
}