Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated logout method. Reverted provious changes to EventCest. Make use Config in RoutingCest #19

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions tests/Functional/AuthenticationCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ public function logout(FunctionalTester $I)
'email' => '[email protected]',
'password' => '123456'
]);
$I->amOnPage('/home');
$I->click('#logout');
$I->amOnPage('/');
$I->seeAuthentication();
$I->logout();
$I->dontSeeAuthentication();
}

public function seeAuthentication(FunctionalTester $I)
Expand Down
2 changes: 0 additions & 2 deletions tests/Functional/EventsCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,10 @@ public function dontSeeEventTriggered(FunctionalTester $I)
// With class name
$I->amOnPage('/');
$I->dontSeeEventTriggered(TestEvent::class);
$I->seeNumRecords(1, User::class);

// With event object
$I->amOnPage('/');
$I->dontSeeEventTriggered(new TestEvent());
$I->seeNumRecords(1, User::class);
}

public function seeEventTriggered(FunctionalTester $I)
Expand Down
5 changes: 3 additions & 2 deletions tests/Functional/RoutingCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Tests\Functional;

use Illuminate\Contracts\Config\Repository as Config;
use App\Http\Controllers\TestController;
use Tests\FunctionalTester;

Expand All @@ -25,13 +26,13 @@ public function seeCurrentActionIs(FunctionalTester $I)
{
$I->amOnPage('/test-value');
$I->seeCurrentActionIs(TestController::class. '@testValue');
$I->see('Test value is: ' . config('test_value'));
$I->see('Test value is: ' . app()->get(Config::class)->get('test_value'));
}

public function seeCurrentRouteIs(FunctionalTester $I)
{
$I->amOnAction(TestController::class. '@testValue');
$I->seeCurrentRouteIs('test-value');
$I->see('Test value is: ' . config('test_value'));
$I->see('Test value is: ' . app()->get(Config::class)->get('test_value'));
}
}