<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jacekk / codeception-dataprovider-module example snippets
public function testSomeHeaders(NoGuy $I)
{
$headerValue = $I->getValue('headers.accept');
$I->assertEquals('text/html', $headerValue);
// or with somethin not set in YML files
$authType = $I->getValue('headers.authorizationType', 'Bearer');
$I->assertEquals('Bearer', $authType);
}
public function testAdminsDataInUsersResource(NoGuy $I)
{
$I->iterateOver('users.admins', function ($user, $index) use ($I) {
$userId = $user['id'];
$I->sendGET("users/{$userId}");
$I->seeResponseContainsJson([
'id' => $userId,
'is_admin' => true,
'email' => $user['email'],
'full_name' => $user['fullName'],
]);
});
}
$ php codecept.phar build
{file}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.