Tests für die API sind vorhanden.

This commit is contained in:
2021-04-06 13:49:42 +02:00
parent b53b1cdd3c
commit d3df8bdc7e
10 changed files with 257 additions and 2 deletions
+34
View File
@@ -0,0 +1,34 @@
<?php
namespace Helper;
// here you can define custom actions
// all public methods declared in helper class will be available in $I
use Codeception\Module;
class Api extends Module
{
const FORMAT_TIME = 'string:regex([0-5]\d:[0-5]\d:[0-5]\d)';
const WORKING_HOURS_JSON_FORMAT = [
'date' => 'string:date',
'workingHours' => self::FORMAT_TIME,
];
const WORKING_HOURS_VIEW_JSON_FORMAT = [
"period" => "string",
"periodDesignation" => "string",
"totalHours" => self::FORMAT_TIME,
"workingDays" => 'integer:>0',
"overtime" => self::FORMAT_TIME,
];
const ERROR_JSON_FORMAT = [
"timestamp" => "string:date-time",
"status" => 0,
"error" => "string",
"message" => "string",
"path" => "string:path",
];
}