Created regular tests
This commit is contained in:
35
tests/_support/Helper/Acceptance.php
Normal file
35
tests/_support/Helper/Acceptance.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
namespace Helper;
|
||||
|
||||
// here you can define custom actions
|
||||
// all public methods declared in helper class will be available in $I
|
||||
|
||||
class Acceptance extends \Codeception\Module
|
||||
{
|
||||
public function cleanMessages(\GuzzleHttp\Client $mailcatcher)
|
||||
{
|
||||
$mailcatcher->delete('messages');
|
||||
}
|
||||
|
||||
public function getLastMessage(\GuzzleHttp\Client $mailcatcher)
|
||||
{
|
||||
$messages = $this->getMessages($mailcatcher);
|
||||
if (empty($messages)) $this->fail('No messages received');
|
||||
|
||||
return reset($messages);
|
||||
}
|
||||
|
||||
public function getMessages(\GuzzleHttp\Client $mailcatcher)
|
||||
{
|
||||
$jsonResponse = $mailcatcher->get('messages');
|
||||
|
||||
return json_decode($jsonResponse->getBody());
|
||||
}
|
||||
|
||||
public function requestEmailResetPasswordLink(\AcceptanceTester $I)
|
||||
{
|
||||
$I->amOnPage('/password/reset');
|
||||
$I->fillField('email', 'admin@laraland.test');
|
||||
$I->click('button[type=submit]');
|
||||
}
|
||||
}
|
||||
10
tests/_support/Helper/Functional.php
Normal file
10
tests/_support/Helper/Functional.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Helper;
|
||||
|
||||
// here you can define custom actions
|
||||
// all public methods declared in helper class will be available in $I
|
||||
|
||||
class Functional extends \Codeception\Module
|
||||
{
|
||||
|
||||
}
|
||||
10
tests/_support/Helper/Unit.php
Normal file
10
tests/_support/Helper/Unit.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Helper;
|
||||
|
||||
// here you can define custom actions
|
||||
// all public methods declared in helper class will be available in $I
|
||||
|
||||
class Unit extends \Codeception\Module
|
||||
{
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user