PHP code example of docler-labs / codeception-slim-module
1. Go to this page and download the library: Download docler-labs/codeception-slim-module library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
docler-labs / codeception-slim-module example snippets
use Slim\Factory\AppFactory;
$app = AppFactory::create();
// Add routes and middlewares here.
return $app;
class UserCest
{
public function getUserReturnsWithEmail(FunctionalTester $I): void
{
$I->haveHttpHeader('Content-Type', 'application/json');
$I->sendGET('/users/John');
$I->seeResponseCodeIs(200);
$I->seeResponseContainsJson(
[
'email' => '[email protected]',
]
);
}
}