Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 91e812b

Browse files
committed
add missing docs
1 parent 6d13e25 commit 91e812b

File tree

4 files changed

+58
-2
lines changed

4 files changed

+58
-2
lines changed

src/Codeception/Module/Laravel/InteractsWithAuthentication.php

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ trait InteractsWithAuthentication
1212
{
1313
/**
1414
* Set the given user object to the current or specified Guard.
15+
*
16+
* ```php
17+
* <?php
18+
* $I->amActingAs($user);
19+
* ```
1520
*/
1621
public function amActingAs(Authenticatable $user, string $guardName = null): void
1722
{
@@ -58,6 +63,11 @@ public function amLoggedAs($user, string $guardName = null): void
5863

5964
/**
6065
* Assert that the user is authenticated as the given user.
66+
*
67+
* ```php
68+
* <?php
69+
* $I->assertAuthenticatedAs($user);
70+
* ```
6171
*/
6272
public function assertAuthenticatedAs(Authenticatable $user, string $guardName = null): void
6373
{
@@ -78,6 +88,14 @@ public function assertAuthenticatedAs(Authenticatable $user, string $guardName =
7888

7989
/**
8090
* Assert that the given credentials are valid.
91+
*
92+
* ```php
93+
* <?php
94+
* $I->assertCredentials([
95+
* 'email' => '[email protected]',
96+
* 'password' => '123456'
97+
* ]);
98+
* ```
8199
*/
82100
public function assertCredentials(array $credentials, string $guardName = null): void
83101
{
@@ -88,6 +106,14 @@ public function assertCredentials(array $credentials, string $guardName = null):
88106

89107
/**
90108
* Assert that the given credentials are invalid.
109+
*
110+
* ```php
111+
* <?php
112+
* $I->assertInvalidCredentials([
113+
* 'email' => '[email protected]',
114+
* 'password' => 'wrong_password'
115+
* ]);
116+
* ```
91117
*/
92118
public function assertInvalidCredentials(array $credentials, string $guardName = null): void
93119
{
@@ -98,6 +124,11 @@ public function assertInvalidCredentials(array $credentials, string $guardName =
98124

99125
/**
100126
* Check that user is not authenticated.
127+
*
128+
* ```php
129+
* <?php
130+
* $I->dontSeeAuthentication();
131+
* ```
101132
*/
102133
public function dontSeeAuthentication(string $guardName = null): void
103134
{
@@ -106,6 +137,11 @@ public function dontSeeAuthentication(string $guardName = null): void
106137

107138
/**
108139
* Logout user.
140+
*
141+
* ```php
142+
* <?php
143+
* $I->logout();
144+
* ```
109145
*/
110146
public function logout(): void
111147
{
@@ -114,6 +150,11 @@ public function logout(): void
114150

115151
/**
116152
* Checks that a user is authenticated.
153+
*
154+
* ```php
155+
* <?php
156+
* $I->seeAuthentication();
157+
* ```
117158
*/
118159
public function seeAuthentication(string $guardName = null): void
119160
{

src/Codeception/Module/Laravel/InteractsWithContainer.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ public function clearApplicationHandlers(): void
2323

2424
/**
2525
* Provides access the Laravel application object.
26+
*
27+
* ```php
28+
* <?php
29+
* $app = $I->getApplication();
30+
* ```
2631
*/
2732
public function getApplication(): Application
2833
{

src/Codeception/Module/Laravel/InteractsWithSession.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ public function dontSeeSessionHasValues(array $bindings): void
5959

6060
/**
6161
* Flush all of the current session data.
62+
*
63+
* ```php
64+
* <?php
65+
* $I->flushSession();
66+
* ```
6267
*/
6368
public function flushSession(): void
6469
{
@@ -68,6 +73,11 @@ public function flushSession(): void
6873

6974
/**
7075
* Set the session to the given array.
76+
*
77+
* ```php
78+
* <?php
79+
* $I->haveInSession(['myKey' => 'MyValue']);
80+
* ```
7181
*/
7282
public function haveInSession(array $data): void
7383
{

src/Codeception/Module/Laravel/MakesHttpRequests.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ public function disableMiddleware($middleware = null): void
2222
}
2323

2424
/**
25-
* Enable the given middleware for the test.
25+
* Enable the given middleware for the next requests.
2626
*
2727
* ```php
2828
* <?php
2929
* $I->enableMiddleware();
3030
* ```
3131
*
32-
* @param string|array|null $middleware
32+
* @param string|array|null $middleware
3333
*/
3434
public function enableMiddleware($middleware = null): void
3535
{

0 commit comments

Comments
 (0)