diff options
Diffstat (limited to 'tests/_support')
| -rw-r--r-- | tests/_support/FunctionalTester.php | 26 | ||||
| -rw-r--r-- | tests/_support/Helper/Credentials.php | 45 | ||||
| -rw-r--r-- | tests/_support/Helper/Functional.php | 10 | ||||
| -rw-r--r-- | tests/_support/Helper/Jsonapi.php | 176 | ||||
| -rw-r--r-- | tests/_support/Helper/StudipDb.php | 77 | ||||
| -rw-r--r-- | tests/_support/Helper/StudipPDO.php | 649 | ||||
| -rw-r--r-- | tests/_support/Helper/Unit.php | 10 | ||||
| -rw-r--r-- | tests/_support/JsonapiTester.php | 26 | ||||
| -rw-r--r-- | tests/_support/UnitTester.php | 26 | ||||
| -rw-r--r-- | tests/_support/_generated/FunctionalTesterActions.php | 16 | ||||
| -rw-r--r-- | tests/_support/_generated/JsonapiTesterActions.php | 1015 | ||||
| -rw-r--r-- | tests/_support/_generated/UnitTesterActions.php | 2050 |
12 files changed, 4126 insertions, 0 deletions
diff --git a/tests/_support/FunctionalTester.php b/tests/_support/FunctionalTester.php new file mode 100644 index 0000000..83fbacd --- /dev/null +++ b/tests/_support/FunctionalTester.php @@ -0,0 +1,26 @@ +<?php + + +/** + * Inherited Methods + * @method void wantToTest($text) + * @method void wantTo($text) + * @method void execute($callable) + * @method void expectTo($prediction) + * @method void expect($prediction) + * @method void amGoingTo($argumentation) + * @method void am($role) + * @method void lookForwardTo($achieveValue) + * @method void comment($description) + * @method void pause() + * + * @SuppressWarnings(PHPMD) +*/ +class FunctionalTester extends \Codeception\Actor +{ + use _generated\FunctionalTesterActions; + + /** + * Define custom actions here + */ +} diff --git a/tests/_support/Helper/Credentials.php b/tests/_support/Helper/Credentials.php new file mode 100644 index 0000000..908d936 --- /dev/null +++ b/tests/_support/Helper/Credentials.php @@ -0,0 +1,45 @@ +<?php + +namespace Helper; + +// here you can define custom actions +// all public methods declared in helper class will be available in $I + +class Credentials extends \Codeception\Module +{ + public function getCredentialsForTestAutor() + { + return [ + 'id' => 'e7a0a84b161f3e8c09b4a0a2e8a58147', + 'username' => 'test_autor', + 'password' => 'testing', + ]; + } + + public function getCredentialsForTestDozent() + { + return [ + 'id' => '205f3efb7997a0fc9755da2b535038da', + 'username' => 'test_dozent', + 'password' => 'testing', + ]; + } + + public function getCredentialsForTestAdmin() + { + return [ + 'id' => '6235c46eb9e962866ebdceece739ace5', + 'username' => 'test_admin', + 'password' => 'testing', + ]; + } + + public function getCredentialsForRoot() + { + return [ + 'id' => '76ed43ef286fb55cf9e41beadb484a9f', + 'username' => 'root@studip', + 'password' => 'testing', + ]; + } +} diff --git a/tests/_support/Helper/Functional.php b/tests/_support/Helper/Functional.php new file mode 100644 index 0000000..4183cb0 --- /dev/null +++ b/tests/_support/Helper/Functional.php @@ -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 +{ + +} diff --git a/tests/_support/Helper/Jsonapi.php b/tests/_support/Helper/Jsonapi.php new file mode 100644 index 0000000..8cd78f7 --- /dev/null +++ b/tests/_support/Helper/Jsonapi.php @@ -0,0 +1,176 @@ +<?php + +namespace Helper; + +use JsonApi\Middlewares\Authentication; +use JsonApi\Middlewares\JsonApi as JsonApiMiddleware; +use Psr\Http\Message\ResponseInterface; +use Slim\Http\Environment; +use Slim\Http\Request; +use Slim\Http\Response; +use WoohooLabs\Yang\JsonApi\Request\JsonApiRequestBuilder; +use WoohooLabs\Yang\JsonApi\Response\JsonApiResponse; + +// here you can define custom actions +// all public methods declared in helper class will be available in $I + +class Jsonapi extends \Codeception\Module +{ + /** + * @SuppressWarnings(PHPMD.Superglobals) + */ + public function withPHPLib($credentials, $function) { + // EVIL HACK + $oldPerm = $GLOBALS['perm']; + $oldUser = $GLOBALS['user']; + $GLOBALS['perm'] = new \Seminar_Perm(); + $GLOBALS['user'] = new \Seminar_User(\User::find($credentials['id'])); + + $result = $function($credentials); + + // EVIL HACK + $GLOBALS['user'] = $oldUser; + $GLOBALS['perm'] = $oldPerm; + + return $result; + } + + public function createApp($credentials, $method, $pattern, $callable, $name = null) + { + return $this->createApp0( + $credentials, + function () use ($method, $pattern, $callable, $name) { + $route = $this->map([$method], $pattern, $callable); + if (isset($name)) { + $route->setName($name); + } + } + ); + } + + public function createRequestBuilder($credentials = null) + { + $env = []; + if ($credentials) { + $env = [ + 'PHP_AUTH_USER' => $credentials['username'], + 'PHP_AUTH_PW' => $credentials['password'], + ]; + } + + $requestBuilder = new JsonApiRequestBuilder( + Request::createFromEnvironment( + Environment::mock($env) + ) + ); + + $requestBuilder + ->setProtocolVersion('1.0') + ->setHeader('Accept-Charset', 'utf-8'); + + return $requestBuilder; + } + + public function sendMockRequest($app, Request $request) + { + $container = $app->getContainer(); + $container['request'] = function ($container) use ($request) { + return $request; + }; + $response = $app($request, new Response()); + + return new JsonApiResponse($response); + } + + private function createApp0($credentials, $routerFn) + { + $app = $this->appFactory(); + + $authenticator = function ($username, $password) use ($credentials) { + // must return a \User + if ($username === $credentials['username'] && $password === $credentials['password']) { + return \User::find($credentials['id']); + } + + return null; + }; + + $group = $app->group('', $routerFn); + + if ($credentials) { + $group->add(function ($request, $response, $next) { + $user = $request->getAttribute(Authentication::USER_KEY, null); + + $GLOBALS['auth'] = new \Seminar_Auth(); + $GLOBALS['auth']->auth = array( + 'uid' => $user->user_id, + 'uname' => $user->username, + 'perm' => $user->perms, + ); + + $GLOBALS['user'] = new \Seminar_User($user->user_id); + + $GLOBALS['perm'] = new \Seminar_Perm(); + $GLOBALS['MAIL_VALIDATE_BOX'] = false; + + return $next($request, $response); + })->add(new Authentication($authenticator)); + } + + $group->add(new JsonApiMiddleware($app)); + + return $app; + } + + private function appFactory() + { + $factory = new \JsonApi\AppFactory(); + + return $factory->makeApp(); + } + + public function storeJsonMD( + $filename, + ResponseInterface $response, + $limit = null, + $ellipsis = null + ) { + $body = "{$response->getBody()}"; + $body = preg_replace( + '!plugins.php\\\\/argonautsplugin!', + 'https:\\/\\/example.com', + $body + ); + $body = preg_replace('!\\\\/!', '/', $body); + $body = preg_replace(['!%5B!', '!%5D!'], ['[', ']'], $body); + + $jsonBody = json_decode($body, true); + + if ($limit && isset($jsonBody['data']) && is_array($jsonBody['data'])) { + $jsonBody['data'] = array_slice($jsonBody['data'], 0, $limit); + if ($ellipsis) { + $jsonBody['data'][] = $ellipsis; + } + } + + $jsonPretty = new \Camspiers\JsonPretty\JsonPretty(); + $json = $jsonPretty->prettify($jsonBody, JSON_UNESCAPED_SLASHES, ' '); + + $dirname = codecept_output_dir().'json-for-slate/'; + if (!file_exists($dirname)) { + @mkdir($dirname); + } + + if (file_exists($dirname)) { + if (substr($filename, -3) !== '.md') { + $filename .= '.md'; + } + if ($filename[0] !== '_') { + $filename = '_'.$filename; + } + file_put_contents($dirname.$filename, "```json\n".$json."\n```\n"); + } + + return $json; + } +} diff --git a/tests/_support/Helper/StudipDb.php b/tests/_support/Helper/StudipDb.php new file mode 100644 index 0000000..8d7f263 --- /dev/null +++ b/tests/_support/Helper/StudipDb.php @@ -0,0 +1,77 @@ +<?php + +namespace Helper; + +use Codeception\Exception\ModuleConfigException; +use Codeception\Exception\ModuleException; + +require_once 'StudipPDO.php'; + +class StudipDb extends \Codeception\Module +{ + /** + * @api + * + * @var + */ + public $dbh; + + /** + * @var array + */ + protected $config = [ + ]; + + /** + * @var array + */ + protected $requiredFields = ['dsn', 'user', 'password']; + + /** + * @SuppressWarnings(PHPMD.CamelCaseMethodName) + */ + public function _initialize() + { + $this->checkConfig('dsn', 'DB_STUDIP_HOST'); + $this->checkConfig('dsn', 'DB_STUDIP_DATABASE'); + $this->checkConfig('user', 'DB_STUDIP_USER'); + $this->checkConfig('password', 'DB_STUDIP_PASSWORD'); + + $this->connect(); + } + + private function checkConfig($configKey, $name) + { + if (strstr($this->config[$configKey], '%'.$name.'%')) { + throw new ModuleConfigException(__CLASS__, 'You have to provide a '.$name.' either as ENV variable or in config_local.inc.php!'); + } + } + + private function connect() + { + try { + $this->dbh = null; + $this->dbh = new \StudipPDO($this->config['dsn'], $this->config['user'], $this->config['password']); + } catch (\PDOException $e) { + throw new ModuleException(__CLASS__, $e->getMessage().' while creating PDO connection'); + } + } + + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.CamelCaseMethodName) + */ + public function _before(\Codeception\TestInterface $test) + { + $this->dbh->beginTransaction(); + } + + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.CamelCaseMethodName) + */ + public function _after(\Codeception\TestInterface $test) + { + $this->dbh->rollBack(); + } +} diff --git a/tests/_support/Helper/StudipPDO.php b/tests/_support/Helper/StudipPDO.php new file mode 100644 index 0000000..b090f3d --- /dev/null +++ b/tests/_support/Helper/StudipPDO.php @@ -0,0 +1,649 @@ +<?php +/** + * StudipPDO.class.php - Stud.IP PDO class. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * @author Elmar Ludwig + * @license http://www.gnu.org/licenses/gpl-2.0.html GPL version 2 + * + * @category Stud.IP + */ + +/** + * This is a special variant of the standard PDO class that does + * not allow multiple statement execution. + */ +class StudipPDO extends PDO +{ + const PARAM_ARRAY = 100; + const PARAM_COLUMN = 101; + + // Counter for the queries sent to the database + public $query_count = 0; + + /** + * Verifies that the given SQL query only contains a single statement. + * + * @param string SQL statement to check + * + * @throws PDOException when the query contains multiple statements + */ + protected function verify($statement) + { + if (mb_strpos($statement, ';') !== false) { + if (preg_match('/;\s*\S/', self::replaceStrings($statement))) { + throw new PDOException('multiple statement execution not allowed'); + } + } + + // Count executed queries (this is placed here since this is the only + // method that is executed on every call to the database) + $this->query_count += 1; + } + + /** + * Replaces all string literals in the statement with placeholders. + * + * @param string SQL statement + * + * @return string modified SQL statement + */ + protected static function replaceStrings($statement) + { + $count = mb_substr_count($statement, '"') + mb_substr_count($statement, "'") + mb_substr_count($statement, '\\'); + + // use fast preg_replace() variant if possible + if ($count < 1000) { + $result = preg_replace('/"(""|\\\\.|[^\\\\"]+)*"|\'(\'\'|\\\\.|[^\\\\\']+)*\'/s', '?', $statement); + } + + if (!isset($result)) { + // split string into parts at quotes and backslash + $parts = preg_split('/([\\\\"\'])/', $statement, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); + $result = ''; + + for ($part = current($parts); $part !== false; $part = next($parts)) { + // inside quotes, "" is ", '' is ' and \x is x + if ($quote_chr !== null) { + if ($part === $quote_chr) { + $part = next($parts); + + if ($part !== $quote_chr) { + // backtrack and terminate string + prev($parts); + $result .= '?'; + $quote_chr = null; + } + } elseif ($part === '\\') { + // skip next part + next($parts); + } + } elseif ($part === "'" || $part === '"') { + $quote_chr = $part; + $saved_pos = key($parts); + } else { + $result .= $part; + } + } + + if ($quote_chr !== null) { + // unterminated quote: copy to end of string + $result .= implode(array_slice($parts, $saved_pos)); + } + } + + return $result; + } + + /** + * Quotes the given value in a form appropriate for the type. + * If no explicit type is given, the value's PHP type is used. + * + * @param string PHP value to quote + * @param int parameter type (e.g. PDO::PARAM_STR) + * + * @return string quoted SQL string + */ + public function quote($value, $type = null) + { + if (!isset($type)) { + if (is_null($value)) { + $type = PDO::PARAM_NULL; + } elseif (is_bool($value)) { + $type = PDO::PARAM_BOOL; + } elseif (is_int($value)) { + $type = PDO::PARAM_INT; + } elseif (is_array($value)) { + $type = self::PARAM_ARRAY; + } else { + $type = PDO::PARAM_STR; + } + } + + switch ($type) { + case PDO::PARAM_NULL: + return 'NULL'; + case PDO::PARAM_BOOL: + return $value ? '1' : '0'; + case PDO::PARAM_INT: + return (int) $value; + case self::PARAM_ARRAY: + return is_array($value) && count($value) ? join(',', array_map(array($this, 'quote'), $value)) : 'NULL'; + case self::PARAM_COLUMN: + return preg_replace('/\\W/', '', $value); + default: + return parent::quote($value); + } + } + + /** + * Executes an SQL statement and returns the number of affected rows. + * + * @param string SQL statement + * + * @return int number of affected rows + */ + public function exec($statement) + { + $this->verify($statement); + + return parent::exec($statement); + } + + /** + * Executes an SQL statement, returning a result set as a statement object. + * + * @param string SQL statement + * @param int fetch mode (optional) + * @param mixed fetch mode parameter (see PDOStatement::setFetchMode) + * @param mixed fetch mode parameter (see PDOStatement::setFetchMode) + * + * @return object PDOStatement object + */ + public function query($statement, $mode = null, $arg1 = null, $arg2 = null) + { + $this->verify($statement); + + if (isset($mode)) { + $stmt = parent::query($statement, $mode, $arg1, $arg2); + } else { + $stmt = parent::query($statement); + } + + $studip_stmt = new StudipPDOStatement($this, $statement, array()); + $studip_stmt->setStatement($stmt); + + return $studip_stmt; + } + + /** + * Prepares a statement for execution and returns a statement object. + * + * @param string SQL statement + * + * @return object PDOStatement object + */ + public function prepare($statement, $driver_options = array()) + { + $this->verify($statement); + + return new StudipPDOStatement($this, $statement, $driver_options); + } + + /** + * This method is intended only for use by the StudipPDOStatement class. + * + * @param string SQL statement + * + * @return object PDOStatement object + */ + public function prepareStatement($statement, $driver_options = array()) + { + return parent::prepare($statement, $driver_options); + } + + /** + * Executes sql statement with given parameters, + * returns number of affected rows, use only for INSERT,UPDATE etc. + * + * @param string $statement SQL statement to execute + * @param array $input_parameters parameters for statement + * + * @return int number of affected rows + */ + public function execute($statement, $input_parameters = null) + { + $st = $this->prepare($statement); + $ok = $st->execute($input_parameters); + if ($ok === true) { + return $st->rowCount(); + } + } + + /** + * Executes sql statement with given parameters, and fetch results + * as sequential array, each row as associative array + * optionally apply given callable on each row, with current row and key as parameter. + * + * @param string $statement SQL statement to execute + * @param array $input_parameters parameters for statement + * @param callable $callable callable to be applied to each of the rows + * + * @return array result set as array of assoc arrays + */ + public function fetchAll($statement, $input_parameters = null, $callable = null) + { + $st = $this->prepare($statement); + $st->execute($input_parameters); + if (is_callable($callable)) { + $data = array(); + $st->setFetchMode(PDO::FETCH_ASSOC); + foreach ($st as $key => $row) { + $data[$key] = call_user_func($callable, $row, $key); + } + } else { + $data = $st->fetchAll(PDO::FETCH_ASSOC); + } + + return $data; + } + + /** + * Executes sql statement with given parameters, and fetch only + * the values from first column as sequential array + * optionally apply given callable on each row, with current value and key as parameter. + * + * @see StudipPDOStatement::fetchFirst() + * + * @param string $statement SQL statement to execute + * @param array $input_parameters parameters for statement + * @param callable $callable callable to be applied to each of the rows + * + * @return array result set + */ + public function fetchFirst($statement, $input_parameters = null, $callable = null) + { + $st = $this->prepare($statement); + $st->execute($input_parameters); + $data = $st->fetchFirst(); + if (is_callable($callable)) { + foreach ($data as $key => $row) { + $data[$key] = call_user_func($callable, $row, $key); + } + } + + return $data; + } + + /** + * Executes sql statement with given parameters, and fetch results + * as associative array, first columns value is used as a key, the others are grouped + * optionally apply given callable on each grouped row, with current row and key as parameter + * if no callable is given, 'current' is used, to return the first entry of the grouped row. + * + * @see StudipPDOStatement::fetchGrouped() + * + * @param string $statement SQL statement to execute + * @param array $input_parameters parameters for statement + * @param callable $callable callable to be applied to each of the rows + * + * @return array result set + */ + public function fetchGrouped($statement, $input_parameters = null, $callable = null) + { + $st = $this->prepare($statement); + $st->execute($input_parameters); + $data = $st->fetchGrouped(PDO::FETCH_ASSOC, is_null($callable) ? 'current' : null); + if (is_callable($callable)) { + foreach ($data as $key => $row) { + $data[$key] = call_user_func($callable, $row, $key); + } + } + + return $data; + } + + /** + * Executes sql statement with given parameters, and fetch results + * as associative array, first columns value is used as a key, the other one is grouped + * use only when selecting 2 columns + * optionally apply given callable on each grouped row, with current row and key as parameter. + * + * @see StudipPDOStatement::fetchGroupedPairs() + * + * @param string $statement SQL statement to execute + * @param array $input_parameters parameters for statement + * @param callable $callable callable to be applied to each of the rows + * + * @return array result set + */ + public function fetchGroupedPairs($statement, $input_parameters = null, $callable = null) + { + $st = $this->prepare($statement); + $st->execute($input_parameters); + $data = $st->fetchGroupedPairs(); + if (is_callable($callable)) { + foreach ($data as $key => $row) { + $data[$key] = call_user_func($callable, $row, $key); + } + } + + return $data; + } + + /** + * Executes sql statement with given parameters, and fetch results + * as associative array, first columns value is used as a key, the other one as the value + * use only when selecting 2 columns + * optionally apply given callable on each grouped row, with current row and key as parameter. + * + * @see StudipPDOStatement::fetchGroupedPairs() + * + * @param string $statement SQL statement to execute + * @param array $input_parameters parameters for statement + * @param callable $callable callable to be applied to each of the rows + * + * @return array result set + */ + public function fetchPairs($statement, $input_parameters = null, $callable = null) + { + $st = $this->prepare($statement); + $st->execute($input_parameters); + $data = $st->fetchPairs(); + if (is_callable($callable)) { + foreach ($data as $key => $row) { + $data[$key] = call_user_func($callable, $row, $key); + } + } + + return $data; + } + + /** + * Executes sql statement with given parameters, and fetch only the first row + * as associative array. + * + * @see StudipPDOStatement::fetchOne() + * + * @param string $statement SQL statement to execute + * @param array $input_parameters parameters for statement + * + * @return array first row of result set + */ + public function fetchOne($statement, $input_parameters = null) + { + $st = $this->prepare($statement); + $st->execute($input_parameters); + + return $st->fetchOne(); + } + + /** + * Executes sql statement with given parameters, and fetch only the value of one column + * third param denotes the column, zero indexed. + * + * @param string $statement SQL statement to execute + * @param array $input_parameters parameters for statement + * @param int $column number of column to fetch + * + * @return string value of chosen column + */ + public function fetchColumn($statement, $input_parameters = null, $column = 0) + { + $st = $this->prepare($statement); + $st->execute($input_parameters); + + return $st->fetchColumn($column); + } +} + +/** + * This is a "fake" PDOStatement implementation that behaves mostly like + * a real statement object, but has some additional features:. + * + * - Parameters passed to execute() are quoted according to their PHP type. + * - A PHP NULL value will result in an actual SQL NULL value in the query. + * - Array types are supported for all placeholders ("WHERE value IN (?)"). + * - Positional and named parameters can be mixed in the same query. + */ +class StudipPDOStatement implements IteratorAggregate +{ + protected $db; + protected $query; + protected $options; + protected $columns; + protected $params; + protected $count; + protected $stmt; + + /** + * Initializes a new StudipPDOStatement instance. + */ + public function __construct($db, $query, $options) + { + $this->db = $db; + $this->query = $query; + $this->options = $options; + $this->params = array(); + } + + /** + * Injects a PDOStatement. + */ + public function setStatement(PDOStatement $statement) + { + $this->stmt = $statement; + } + + /** + * Arranges to have a particular variable bound to a given column in + * the result-set from a query. Each call to fetch() or fetchAll() + * will update all the variables that are bound to columns. + */ + public function bindColumn($column, &$param/*, ...*/) + { + $args = func_get_args(); + $args[1] = &$param; + $this->columns[] = $args; + + return true; + } + + /** + * Binds a PHP variable to a corresponding named or question mark place- + * holder in the SQL statement that was used to prepare the statement. + * Unlike bindValue(), the variable is bound as a reference and will + * only be evaluated at the time that execute() is called. + */ + public function bindParam($parameter, &$variable, $data_type = null) + { + if (is_string($parameter) && $parameter[0] !== ':') { + $parameter = ':'.$parameter; + } + + $this->params[$parameter] = array('value' => &$variable, 'type' => $data_type); + + return true; + } + + /** + * Binds a value to a corresponding named or question mark placeholder + * in the SQL statement that was used to prepare the statement. + */ + public function bindValue($parameter, $value, $data_type = null) + { + if (is_string($parameter) && $parameter[0] !== ':') { + $parameter = ':'.$parameter; + } + + $this->params[$parameter] = array('value' => $value, 'type' => $data_type); + + return true; + } + + /** + * Forwards all unknown methods to the actual statement object. + */ + public function __call($name, array $arguments) + { + $callable = array($this->stmt, $name); + if (!is_callable($callable)) { + throw new BadMethodCallException(); + } + + return call_user_func_array($callable, $arguments); + } + + /** + * Forwards all Iterator methods to the actual statement object. + */ + public function getIterator() + { + return $this->stmt; + } + + /** + * Executes the prepared statement and returns a PDOStatement object. + */ + public function execute($input_parameters = null) + { + // bind additional parameters from execute() + if (isset($input_parameters)) { + foreach ($input_parameters as $key => $value) { + $this->bindValue(is_int($key) ? $key + 1 : $key, $value, null); + } + } + + // emulate prepared statement if necessary + foreach ($this->params as $key => $param) { + if ($param['type'] === StudipPDO::PARAM_ARRAY || + $param['type'] === StudipPDO::PARAM_COLUMN || + $param['type'] === null && !is_string($param['value'])) { + $emulate_prepare = true; + break; + } + } + + // build the actual query string and prepared statement + if ($emulate_prepare) { + $this->count = 1; + $query = preg_replace_callback('/\?|:\w+/', array($this, 'replaceParam'), $this->query); + } else { + $query = $this->query; + } + + $this->stmt = $this->db->prepareStatement($query, $this->options); + + // bind query parameters on the actual statement + if (!$emulate_prepare) { + foreach ($this->params as $key => $param) { + $this->stmt->bindValue($key, $param['value'], $param['type']); + } + } + + // set up column bindings on the actual statement + if (isset($this->columns)) { + foreach ($this->columns as $args) { + call_user_func_array(array($this->stmt, 'bindColumn'), $args); + } + } + + return $this->stmt->execute(); + } + + /** + * Replaces a placeholder with the corresponding parameter value. + * Throws an exception if there is no corresponding value. + */ + protected function replaceParam($matches) + { + $name = $matches[0]; + + if ($name == '?') { + $key = $this->count++; + } else { + $key = $name; + } + + if (!isset($this->params[$key])) { + throw new PDOException('missing parameter in query: '.$key); + } + + return $this->db->quote($this->params[$key]['value'], $this->params[$key]['type']); + } + + /** + * Returns the result set rows as a grouped associative array. The first field + * of each row is used as the array's keys. + * optionally apply given callable on each grouped row to aggregate results + * if no callable is given, 'current' is used, to return the first entry of the grouped row. + * + * @param int $fetch_style Either PDO::FETCH_ASSOC or PDO::FETCH_COLUMN + * @param callable $group_func function to aggregate grouped rows + * + * @return array grouped result set + */ + public function fetchGrouped($fetch_style = PDO::FETCH_ASSOC, $group_func = 'current') + { + if (!($fetch_style & (PDO::FETCH_ASSOC | PDO::FETCH_COLUMN))) { + throw new PDOException('Fetch style not supported, try FETCH_ASSOC or FETCH_COLUMN'); + } + + $fetch_style |= PDO::FETCH_GROUP; + $rows = $this->fetchAll($fetch_style); + + return is_callable($group_func) ? array_map($group_func, $rows) : $rows; + } + + /** + * Returns the result set rows as a grouped associative array. The first field + * of each row is used as the array's keys, the other one is grouped + * use only when selecting 2 columns + * optionally apply given callable on each grouped row to aggregate results. + * + * @param callable $group_func function to aggregate grouped rows + * + * @return array grouped result set + */ + public function fetchGroupedPairs($group_func = null) + { + return $this->fetchGrouped(PDO::FETCH_COLUMN, $group_func); + } + + /** + * Returns result rows as associative array, first colum as key, + * second as value. Use only when selecting 2 columns. + * + * @return array result set + */ + public function fetchPairs() + { + return $this->fetchAll(PDO::FETCH_KEY_PAIR); + } + + /** + * Returns sequential array with values from first colum. + * + * @return array first row result set + */ + public function fetchFirst() + { + return $this->fetchAll(PDO::FETCH_COLUMN); + } + + /** + * Returns only first row of result set as associative array. + * + * @return array first row result set + */ + public function fetchOne() + { + $data = $this->fetch(PDO::FETCH_ASSOC); + + return $data ?: array(); + } +} diff --git a/tests/_support/Helper/Unit.php b/tests/_support/Helper/Unit.php new file mode 100644 index 0000000..6064d37 --- /dev/null +++ b/tests/_support/Helper/Unit.php @@ -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 +{ + +} diff --git a/tests/_support/JsonapiTester.php b/tests/_support/JsonapiTester.php new file mode 100644 index 0000000..21bc370 --- /dev/null +++ b/tests/_support/JsonapiTester.php @@ -0,0 +1,26 @@ +<?php + + +/** + * Inherited Methods + * @method void wantToTest($text) + * @method void wantTo($text) + * @method void execute($callable) + * @method void expectTo($prediction) + * @method void expect($prediction) + * @method void amGoingTo($argumentation) + * @method void am($role) + * @method void lookForwardTo($achieveValue) + * @method void comment($description) + * @method void pause() + * + * @SuppressWarnings(PHPMD) +*/ +class JsonapiTester extends \Codeception\Actor +{ + use _generated\JsonapiTesterActions; + + /** + * Define custom actions here + */ +} diff --git a/tests/_support/UnitTester.php b/tests/_support/UnitTester.php new file mode 100644 index 0000000..e19544a --- /dev/null +++ b/tests/_support/UnitTester.php @@ -0,0 +1,26 @@ +<?php + + +/** + * Inherited Methods + * @method void wantToTest($text) + * @method void wantTo($text) + * @method void execute($callable) + * @method void expectTo($prediction) + * @method void expect($prediction) + * @method void amGoingTo($argumentation) + * @method void am($role) + * @method void lookForwardTo($achieveValue) + * @method void comment($description) + * @method void pause() + * + * @SuppressWarnings(PHPMD) +*/ +class UnitTester extends \Codeception\Actor +{ + use _generated\UnitTesterActions; + + /** + * Define custom actions here + */ +} diff --git a/tests/_support/_generated/FunctionalTesterActions.php b/tests/_support/_generated/FunctionalTesterActions.php new file mode 100644 index 0000000..8257a4e --- /dev/null +++ b/tests/_support/_generated/FunctionalTesterActions.php @@ -0,0 +1,16 @@ +<?php //[STAMP] 6e8eab5089e8fcc600b23f9a78b89b9c +namespace _generated; + +// This class was automatically generated by build task +// You should not change it manually as it will be overwritten on next build +// @codingStandardsIgnoreFile + +trait FunctionalTesterActions +{ + /** + * @return \Codeception\Scenario + */ + abstract protected function getScenario(); + + +} diff --git a/tests/_support/_generated/JsonapiTesterActions.php b/tests/_support/_generated/JsonapiTesterActions.php new file mode 100644 index 0000000..cb4f492 --- /dev/null +++ b/tests/_support/_generated/JsonapiTesterActions.php @@ -0,0 +1,1015 @@ +<?php //[STAMP] 686e44487f85339db9d6c30356fecf96 +namespace _generated; + +// This class was automatically generated by build task +// You should not change it manually as it will be overwritten on next build +// @codingStandardsIgnoreFile + +trait JsonapiTesterActions +{ + /** + * @return \Codeception\Scenario + */ + abstract protected function getScenario(); + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Handles and checks exception called inside callback function. + * Either exception class name or exception instance should be provided. + * + * ```php + * <?php + * $I->expectException(MyException::class, function() { + * $this->doSomethingBad(); + * }); + * + * $I->expectException(new MyException(), function() { + * $this->doSomethingBad(); + * }); + * ``` + * If you want to check message or exception code, you can pass them with exception instance: + * ```php + * <?php + * // will check that exception MyException is thrown with "Don't do bad things" message + * $I->expectException(new MyException("Don't do bad things"), function() { + * $this->doSomethingBad(); + * }); + * ``` + * + * @deprecated Use expectThrowable() instead + * @param $exception string or \Exception + * @param $callback + * @see \Codeception\Module\Asserts::expectException() + */ + public function expectException($exception, $callback) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('expectException', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Handles and checks throwables (Exceptions/Errors) called inside the callback function. + * Either throwable class name or throwable instance should be provided. + * + * ```php + * <?php + * $I->expectThrowable(MyThrowable::class, function() { + * $this->doSomethingBad(); + * }); + * + * $I->expectThrowable(new MyException(), function() { + * $this->doSomethingBad(); + * }); + * ``` + * If you want to check message or throwable code, you can pass them with throwable instance: + * ```php + * <?php + * // will check that throwable MyError is thrown with "Don't do bad things" message + * $I->expectThrowable(new MyError("Don't do bad things"), function() { + * $this->doSomethingBad(); + * }); + * ``` + * + * @param $throwable string or \Throwable + * @param $callback + * @see \Codeception\Module\Asserts::expectThrowable() + */ + public function expectThrowable($throwable, $callback) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('expectThrowable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that two variables are equal. + * + * @param $expected + * @param $actual + * @param string $message + * @param float $delta + * @see \Codeception\Module\Asserts::assertEquals() + */ + public function assertEquals($expected, $actual, $message = null, $delta = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that two variables are not equal + * + * @param $expected + * @param $actual + * @param string $message + * @param float $delta + * @see \Codeception\Module\Asserts::assertNotEquals() + */ + public function assertNotEquals($expected, $actual, $message = null, $delta = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that two variables are same + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\Asserts::assertSame() + */ + public function assertSame($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSame', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that two variables are not same + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\Asserts::assertNotSame() + */ + public function assertNotSame($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that actual is greater than expected + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\Asserts::assertGreaterThan() + */ + public function assertGreaterThan($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that actual is greater or equal than expected + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\Asserts::assertGreaterThanOrEqual() + */ + public function assertGreaterThanOrEqual($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that actual is less than expected + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\Asserts::assertLessThan() + */ + public function assertLessThan($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that actual is less or equal than expected + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\Asserts::assertLessThanOrEqual() + */ + public function assertLessThanOrEqual($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that haystack contains needle + * + * @param $needle + * @param $haystack + * @param string $message + * @see \Codeception\Module\Asserts::assertContains() + */ + public function assertContains($needle, $haystack, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContains', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that haystack doesn't contain needle. + * + * @param $needle + * @param $haystack + * @param string $message + * @see \Codeception\Module\Asserts::assertNotContains() + */ + public function assertNotContains($needle, $haystack, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that string match with pattern + * + * @param string $pattern + * @param string $string + * @param string $message + * @see \Codeception\Module\Asserts::assertRegExp() + */ + public function assertRegExp($pattern, $string, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertRegExp', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that string not match with pattern + * + * @param string $pattern + * @param string $string + * @param string $message + * @see \Codeception\Module\Asserts::assertNotRegExp() + */ + public function assertNotRegExp($pattern, $string, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotRegExp', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that a string starts with the given prefix. + * + * @param string $prefix + * @param string $string + * @param string $message + * @see \Codeception\Module\Asserts::assertStringStartsWith() + */ + public function assertStringStartsWith($prefix, $string, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringStartsWith', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that a string doesn't start with the given prefix. + * + * @param string $prefix + * @param string $string + * @param string $message + * @see \Codeception\Module\Asserts::assertStringStartsNotWith() + */ + public function assertStringStartsNotWith($prefix, $string, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringStartsNotWith', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that variable is empty. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\Asserts::assertEmpty() + */ + public function assertEmpty($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that variable is not empty. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\Asserts::assertNotEmpty() + */ + public function assertNotEmpty($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that variable is NULL + * + * @param $actual + * @param string $message + * @see \Codeception\Module\Asserts::assertNull() + */ + public function assertNull($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNull', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that variable is not NULL + * + * @param $actual + * @param string $message + * @see \Codeception\Module\Asserts::assertNotNull() + */ + public function assertNotNull($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that condition is positive. + * + * @param $condition + * @param string $message + * @see \Codeception\Module\Asserts::assertTrue() + */ + public function assertTrue($condition, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertTrue', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the condition is NOT true (everything but true) + * + * @param $condition + * @param string $message + * @see \Codeception\Module\Asserts::assertNotTrue() + */ + public function assertNotTrue($condition, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotTrue', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that condition is negative. + * + * @param $condition + * @param string $message + * @see \Codeception\Module\Asserts::assertFalse() + */ + public function assertFalse($condition, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFalse', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the condition is NOT false (everything but false) + * + * @param $condition + * @param string $message + * @see \Codeception\Module\Asserts::assertNotFalse() + */ + public function assertNotFalse($condition, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotFalse', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks if file exists + * + * @param string $filename + * @param string $message + * @see \Codeception\Module\Asserts::assertFileExists() + */ + public function assertFileExists($filename, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileExists', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks if file doesn't exist + * + * @param string $filename + * @param string $message + * @see \Codeception\Module\Asserts::assertFileNotExists() + */ + public function assertFileNotExists($filename, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotExists', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param $expected + * @param $actual + * @param $description + * @see \Codeception\Module\Asserts::assertGreaterOrEquals() + */ + public function assertGreaterOrEquals($expected, $actual, $description = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterOrEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param $expected + * @param $actual + * @param $description + * @see \Codeception\Module\Asserts::assertLessOrEquals() + */ + public function assertLessOrEquals($expected, $actual, $description = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessOrEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param $actual + * @param $description + * @see \Codeception\Module\Asserts::assertIsEmpty() + */ + public function assertIsEmpty($actual, $description = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsEmpty', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param $key + * @param $actual + * @param $description + * @see \Codeception\Module\Asserts::assertArrayHasKey() + */ + public function assertArrayHasKey($key, $actual, $description = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayHasKey', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param $key + * @param $actual + * @param $description + * @see \Codeception\Module\Asserts::assertArrayNotHasKey() + */ + public function assertArrayNotHasKey($key, $actual, $description = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayNotHasKey', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param $expectedCount + * @param $actual + * @param $description + * @see \Codeception\Module\Asserts::assertCount() + */ + public function assertCount($expectedCount, $actual, $description = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertCount', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param $class + * @param $actual + * @param $description + * @see \Codeception\Module\Asserts::assertInstanceOf() + */ + public function assertInstanceOf($class, $actual, $description = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertInstanceOf', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param $class + * @param $actual + * @param $description + * @see \Codeception\Module\Asserts::assertNotInstanceOf() + */ + public function assertNotInstanceOf($class, $actual, $description = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotInstanceOf', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param $type + * @param $actual + * @param $description + * @see \Codeception\Module\Asserts::assertInternalType() + */ + public function assertInternalType($type, $actual, $description = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertInternalType', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Fails the test with message. + * + * @param $message + * @see \Codeception\Module\Asserts::fail() + */ + public function fail($message) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('fail', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertStringContainsString() + */ + public function assertStringContainsString($needle, $haystack, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringContainsString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertStringNotContainsString() + */ + public function assertStringNotContainsString($needle, $haystack, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotContainsString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertStringContainsStringIgnoringCase() + */ + public function assertStringContainsStringIgnoringCase($needle, $haystack, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringContainsStringIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertStringNotContainsStringIgnoringCase() + */ + public function assertStringNotContainsStringIgnoringCase($needle, $haystack, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotContainsStringIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @since 1.1.0 of module-asserts + * @see \Codeception\Module\Asserts::assertStringEndsWith() + */ + public function assertStringEndsWith($suffix, $string, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEndsWith', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @since 1.1.0 of module-asserts + * @see \Codeception\Module\Asserts::assertStringEndsNotWith() + */ + public function assertStringEndsNotWith($suffix, $string, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEndsNotWith', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertIsArray() + */ + public function assertIsArray($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsArray', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertIsBool() + */ + public function assertIsBool($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsBool', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertIsFloat() + */ + public function assertIsFloat($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsFloat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertIsInt() + */ + public function assertIsInt($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsInt', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertIsNumeric() + */ + public function assertIsNumeric($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNumeric', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertIsObject() + */ + public function assertIsObject($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsObject', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertIsResource() + */ + public function assertIsResource($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertIsString() + */ + public function assertIsString($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertIsScalar() + */ + public function assertIsScalar($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsScalar', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertIsCallable() + */ + public function assertIsCallable($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsCallable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertIsNotArray() + */ + public function assertIsNotArray($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotArray', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertIsNotBool() + */ + public function assertIsNotBool($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotBool', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertIsNotFloat() + */ + public function assertIsNotFloat($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotFloat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertIsNotInt() + */ + public function assertIsNotInt($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotInt', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertIsNotNumeric() + */ + public function assertIsNotNumeric($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotNumeric', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertIsNotObject() + */ + public function assertIsNotObject($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotObject', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertIsNotResource() + */ + public function assertIsNotResource($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertIsNotString() + */ + public function assertIsNotString($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertIsNotScalar() + */ + public function assertIsNotScalar($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotScalar', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertIsNotCallable() + */ + public function assertIsNotCallable($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotCallable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertEqualsCanonicalizing() + */ + public function assertEqualsCanonicalizing($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertNotEqualsCanonicalizing() + */ + public function assertNotEqualsCanonicalizing($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertEqualsIgnoringCase() + */ + public function assertEqualsIgnoringCase($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertNotEqualsIgnoringCase() + */ + public function assertNotEqualsIgnoringCase($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertEqualsWithDelta() + */ + public function assertEqualsWithDelta($expected, $actual, $delta, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsWithDelta', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\Asserts::assertNotEqualsWithDelta() + */ + public function assertNotEqualsWithDelta($expected, $actual, $delta, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsWithDelta', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Helper\Credentials::getCredentialsForTestAutor() + */ + public function getCredentialsForTestAutor() { + return $this->getScenario()->runStep(new \Codeception\Step\Action('getCredentialsForTestAutor', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Helper\Credentials::getCredentialsForTestDozent() + */ + public function getCredentialsForTestDozent() { + return $this->getScenario()->runStep(new \Codeception\Step\Action('getCredentialsForTestDozent', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Helper\Credentials::getCredentialsForTestAdmin() + */ + public function getCredentialsForTestAdmin() { + return $this->getScenario()->runStep(new \Codeception\Step\Action('getCredentialsForTestAdmin', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Helper\Credentials::getCredentialsForRoot() + */ + public function getCredentialsForRoot() { + return $this->getScenario()->runStep(new \Codeception\Step\Action('getCredentialsForRoot', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @SuppressWarnings(PHPMD.Superglobals) + * @see \Helper\Jsonapi::withPHPLib() + */ + public function withPHPLib($credentials, $function) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('withPHPLib', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Helper\Jsonapi::createApp() + */ + public function createApp($credentials, $method, $pattern, $callable, $name = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('createApp', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Helper\Jsonapi::createRequestBuilder() + */ + public function createRequestBuilder($credentials = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('createRequestBuilder', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Helper\Jsonapi::sendMockRequest() + */ + public function sendMockRequest($app, $request) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('sendMockRequest', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Helper\Jsonapi::storeJsonMD() + */ + public function storeJsonMD($filename, $response, $limit = null, $ellipsis = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('storeJsonMD', func_get_args())); + } +} diff --git a/tests/_support/_generated/UnitTesterActions.php b/tests/_support/_generated/UnitTesterActions.php new file mode 100644 index 0000000..a852f52 --- /dev/null +++ b/tests/_support/_generated/UnitTesterActions.php @@ -0,0 +1,2050 @@ +<?php //[STAMP] fa8df0490412d9204c4540517c0a830a +namespace _generated; + +// This class was automatically generated by build task +// You should not change it manually as it will be overwritten on next build +// @codingStandardsIgnoreFile + +trait UnitTesterActions +{ + /** + * @return \Codeception\Scenario + */ + abstract protected function getScenario(); + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Handles and checks exception called inside callback function. + * Either exception class name or exception instance should be provided. + * + * ```php + * <?php + * $I->expectException(MyException::class, function() { + * $this->doSomethingBad(); + * }); + * + * $I->expectException(new MyException(), function() { + * $this->doSomethingBad(); + * }); + * ``` + * If you want to check message or exception code, you can pass them with exception instance: + * ```php + * <?php + * // will check that exception MyException is thrown with "Don't do bad things" message + * $I->expectException(new MyException("Don't do bad things"), function() { + * $this->doSomethingBad(); + * }); + * ``` + * + * @deprecated Use expectThrowable() instead + * @param Exception|string $exception + * @param callable $callback + * @see \Codeception\Module\Asserts::expectException() + */ + public function expectException($exception, $callback) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('expectException', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Handles and checks throwables (Exceptions/Errors) called inside the callback function. + * Either throwable class name or throwable instance should be provided. + * + * ```php + * <?php + * $I->expectThrowable(MyThrowable::class, function() { + * $this->doSomethingBad(); + * }); + * + * $I->expectThrowable(new MyException(), function() { + * $this->doSomethingBad(); + * }); + * ``` + * If you want to check message or throwable code, you can pass them with throwable instance: + * ```php + * <?php + * // will check that throwable MyError is thrown with "Don't do bad things" message + * $I->expectThrowable(new MyError("Don't do bad things"), function() { + * $this->doSomethingBad(); + * }); + * ``` + * + * @param Throwable|string $throwable + * @param callable $callback + * @see \Codeception\Module\Asserts::expectThrowable() + */ + public function expectThrowable($throwable, $callback) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('expectThrowable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file does not exist. + * + * @param string $filename + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileNotExists() + */ + public function assertFileNotExists($filename, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotExists', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is greater than or equal to another value. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertGreaterOrEquals() + */ + public function assertGreaterOrEquals($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterOrEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is empty. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsEmpty() + */ + public function assertIsEmpty($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsEmpty', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is smaller than or equal to another value. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertLessOrEquals() + */ + public function assertLessOrEquals($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessOrEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string does not match a given regular expression. + * + * @param string $pattern + * @param string $string + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotRegExp() + */ + public function assertNotRegExp($pattern, $string, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotRegExp', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string matches a given regular expression. + * + * @param string $pattern + * @param string $string + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertRegExp() + */ + public function assertRegExp($pattern, $string, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertRegExp', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Evaluates a PHPUnit\Framework\Constraint matcher object. + * + * @param $value + * @param Constraint $constraint + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertThatItsNot() + */ + public function assertThatItsNot($value, $constraint, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertThatItsNot', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that an array has a specified key. + * + * @param int|string $key + * @param array|ArrayAccess $array + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertArrayHasKey() + */ + public function assertArrayHasKey($key, $array, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayHasKey', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that an array does not have a specified key. + * + * @param int|string $key + * @param array|ArrayAccess $array + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertArrayNotHasKey() + */ + public function assertArrayNotHasKey($key, $array, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayNotHasKey', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a class has a specified attribute. + * + * @param string $attributeName + * @param string $className + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertClassHasAttribute() + */ + public function assertClassHasAttribute($attributeName, $className, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassHasAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a class has a specified static attribute. + * + * @param string $attributeName + * @param string $className + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertClassHasStaticAttribute() + */ + public function assertClassHasStaticAttribute($attributeName, $className, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassHasStaticAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a class does not have a specified attribute. + * + * @param string $attributeName + * @param string $className + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertClassNotHasAttribute() + */ + public function assertClassNotHasAttribute($attributeName, $className, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassNotHasAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a class does not have a specified static attribute. + * + * @param string $attributeName + * @param string $className + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertClassNotHasStaticAttribute() + */ + public function assertClassNotHasStaticAttribute($attributeName, $className, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassNotHasStaticAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack contains a needle. + * + * @param $needle + * @param $haystack + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertContains() + */ + public function assertContains($needle, $haystack, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContains', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param $needle + * @param $haystack + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertContainsEquals() + */ + public function assertContainsEquals($needle, $haystack, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack contains only values of a given type. + * + * @param string $type + * @param $haystack + * @param bool|null $isNativeType + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertContainsOnly() + */ + public function assertContainsOnly($type, $haystack, $isNativeType = null, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnly', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack contains only instances of a given class name. + * + * @param string $className + * @param $haystack + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertContainsOnlyInstancesOf() + */ + public function assertContainsOnlyInstancesOf($className, $haystack, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnlyInstancesOf', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts the number of elements of an array, Countable or Traversable. + * + * @param int $expectedCount + * @param Countable|iterable $haystack + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertCount() + */ + public function assertCount($expectedCount, $haystack, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertCount', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory does not exist. + * + * @param string $directory + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertDirectoryDoesNotExist() + */ + public function assertDirectoryDoesNotExist($directory, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryDoesNotExist', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists. + * + * @param string $directory + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertDirectoryExists() + */ + public function assertDirectoryExists($directory, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryExists', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists and is not readable. + * + * @param string $directory + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsNotReadable() + */ + public function assertDirectoryIsNotReadable($directory, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsNotReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists and is not writable. + * + * @param string $directory + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsNotWritable() + */ + public function assertDirectoryIsNotWritable($directory, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsNotWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists and is readable. + * + * @param string $directory + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsReadable() + */ + public function assertDirectoryIsReadable($directory, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists and is writable. + * + * @param string $directory + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsWritable() + */ + public function assertDirectoryIsWritable($directory, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string does not match a given regular expression. + * + * @param string $pattern + * @param string $string + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertDoesNotMatchRegularExpression() + */ + public function assertDoesNotMatchRegularExpression($pattern, $string, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDoesNotMatchRegularExpression', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is empty. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertEmpty() + */ + public function assertEmpty($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are equal. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertEquals() + */ + public function assertEquals($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are equal (canonicalizing). + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertEqualsCanonicalizing() + */ + public function assertEqualsCanonicalizing($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are equal (ignoring case). + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertEqualsIgnoringCase() + */ + public function assertEqualsIgnoringCase($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are equal (with delta). + * + * @param $expected + * @param $actual + * @param float $delta + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertEqualsWithDelta() + */ + public function assertEqualsWithDelta($expected, $actual, $delta, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsWithDelta', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a condition is false. + * + * @param $condition + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFalse() + */ + public function assertFalse($condition, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFalse', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file does not exist. + * + * @param string $filename + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileDoesNotExist() + */ + public function assertFileDoesNotExist($filename, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileDoesNotExist', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is equal to the contents of another file. + * + * @param string $expected + * @param string $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileEquals() + */ + public function assertFileEquals($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is equal to the contents of another file (canonicalizing). + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileEqualsCanonicalizing() + */ + public function assertFileEqualsCanonicalizing($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEqualsCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is equal to the contents of another file (ignoring case). + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileEqualsIgnoringCase() + */ + public function assertFileEqualsIgnoringCase($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEqualsIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists. + * + * @param string $filename + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileExists() + */ + public function assertFileExists($filename, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileExists', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists and is not readable. + * + * @param string $file + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileIsNotReadable() + */ + public function assertFileIsNotReadable($file, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsNotReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists and is not writable. + * + * @param string $file + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileIsNotWritable() + */ + public function assertFileIsNotWritable($file, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsNotWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists and is readable. + * + * @param string $file + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileIsReadable() + */ + public function assertFileIsReadable($file, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists and is writable. + * + * @param string $file + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileIsWritable() + */ + public function assertFileIsWritable($file, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is not equal to the contents of another file. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileNotEquals() + */ + public function assertFileNotEquals($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is not equal to the contents of another file (canonicalizing). + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileNotEqualsCanonicalizing() + */ + public function assertFileNotEqualsCanonicalizing($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEqualsCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is not equal to the contents of another file (ignoring case). + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileNotEqualsIgnoringCase() + */ + public function assertFileNotEqualsIgnoringCase($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEqualsIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is finite. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFinite() + */ + public function assertFinite($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFinite', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is greater than another value. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertGreaterThan() + */ + public function assertGreaterThan($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is greater than or equal to another value. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertGreaterThanOrEqual() + */ + public function assertGreaterThanOrEqual($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is infinite. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertInfinite() + */ + public function assertInfinite($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertInfinite', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of a given type. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertInstanceOf() + */ + public function assertInstanceOf($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertInstanceOf', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type array. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsArray() + */ + public function assertIsArray($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsArray', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type bool. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsBool() + */ + public function assertIsBool($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsBool', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type callable. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsCallable() + */ + public function assertIsCallable($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsCallable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type resource and is closed. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsClosedResource() + */ + public function assertIsClosedResource($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsClosedResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type float. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsFloat() + */ + public function assertIsFloat($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsFloat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type int. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsInt() + */ + public function assertIsInt($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsInt', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type iterable. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsIterable() + */ + public function assertIsIterable($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsIterable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type array. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotArray() + */ + public function assertIsNotArray($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotArray', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type bool. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotBool() + */ + public function assertIsNotBool($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotBool', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type callable. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotCallable() + */ + public function assertIsNotCallable($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotCallable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type resource. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotClosedResource() + */ + public function assertIsNotClosedResource($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotClosedResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type float. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotFloat() + */ + public function assertIsNotFloat($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotFloat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type int. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotInt() + */ + public function assertIsNotInt($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotInt', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type iterable. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotIterable() + */ + public function assertIsNotIterable($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotIterable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type numeric. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotNumeric() + */ + public function assertIsNotNumeric($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotNumeric', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type object. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotObject() + */ + public function assertIsNotObject($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotObject', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file/dir exists and is not readable. + * + * @param string $filename + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotReadable() + */ + public function assertIsNotReadable($filename, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type resource. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotResource() + */ + public function assertIsNotResource($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type scalar. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotScalar() + */ + public function assertIsNotScalar($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotScalar', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type string. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotString() + */ + public function assertIsNotString($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file/dir exists and is not writable. + * + * @param $filename + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotWritable() + */ + public function assertIsNotWritable($filename, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type numeric. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNumeric() + */ + public function assertIsNumeric($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNumeric', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type object. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsObject() + */ + public function assertIsObject($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsObject', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file/dir is readable. + * + * @param $filename + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsReadable() + */ + public function assertIsReadable($filename, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type resource. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsResource() + */ + public function assertIsResource($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type scalar. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsScalar() + */ + public function assertIsScalar($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsScalar', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type string. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsString() + */ + public function assertIsString($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file/dir exists and is writable. + * + * @param $filename + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsWritable() + */ + public function assertIsWritable($filename, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string is a valid JSON string. + * + * @param string $actualJson + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertJson() + */ + public function assertJson($actualJson, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJson', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two JSON files are equal. + * + * @param string $expectedFile + * @param string $actualFile + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertJsonFileEqualsJsonFile() + */ + public function assertJsonFileEqualsJsonFile($expectedFile, $actualFile, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonFileEqualsJsonFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two JSON files are not equal. + * + * @param string $expectedFile + * @param string $actualFile + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertJsonFileNotEqualsJsonFile() + */ + public function assertJsonFileNotEqualsJsonFile($expectedFile, $actualFile, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonFileNotEqualsJsonFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the generated JSON encoded object and the content of the given file are equal. + * + * @param string $expectedFile + * @param string $actualJson + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertJsonStringEqualsJsonFile() + */ + public function assertJsonStringEqualsJsonFile($expectedFile, $actualJson, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringEqualsJsonFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two given JSON encoded objects or arrays are equal. + * + * @param string $expectedJson + * @param string $actualJson + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertJsonStringEqualsJsonString() + */ + public function assertJsonStringEqualsJsonString($expectedJson, $actualJson, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringEqualsJsonString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the generated JSON encoded object and the content of the given file are not equal. + * + * @param string $expectedFile + * @param string $actualJson + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertJsonStringNotEqualsJsonFile() + */ + public function assertJsonStringNotEqualsJsonFile($expectedFile, $actualJson, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringNotEqualsJsonFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two given JSON encoded objects or arrays are not equal. + * + * @param string $expectedJson + * @param string $actualJson + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertJsonStringNotEqualsJsonString() + */ + public function assertJsonStringNotEqualsJsonString($expectedJson, $actualJson, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringNotEqualsJsonString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is smaller than another value. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertLessThan() + */ + public function assertLessThan($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is smaller than or equal to another value. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertLessThanOrEqual() + */ + public function assertLessThanOrEqual($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string matches a given regular expression. + * + * @param string $pattern + * @param string $string + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertMatchesRegularExpression() + */ + public function assertMatchesRegularExpression($pattern, $string, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertMatchesRegularExpression', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is nan. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNan() + */ + public function assertNan($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNan', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack does not contain a needle. + * + * @param $needle + * @param $haystack + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotContains() + */ + public function assertNotContains($needle, $haystack, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\AbstractAsserts::assertNotContainsEquals() + */ + public function assertNotContainsEquals($needle, $haystack, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContainsEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack does not contain only values of a given type. + * + * @param string $type + * @param $haystack + * @param bool|null $isNativeType + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotContainsOnly() + */ + public function assertNotContainsOnly($type, $haystack, $isNativeType = null, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContainsOnly', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts the number of elements of an array, Countable or Traversable. + * + * @param int $expectedCount + * @param Countable|iterable $haystack + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotCount() + */ + public function assertNotCount($expectedCount, $haystack, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotCount', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not empty. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotEmpty() + */ + public function assertNotEmpty($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are not equal. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotEquals() + */ + public function assertNotEquals($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are not equal (canonicalizing). + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotEqualsCanonicalizing() + */ + public function assertNotEqualsCanonicalizing($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are not equal (ignoring case). + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotEqualsIgnoringCase() + */ + public function assertNotEqualsIgnoringCase($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are not equal (with delta). + * + * @param $expected + * @param $actual + * @param float $delta + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotEqualsWithDelta() + */ + public function assertNotEqualsWithDelta($expected, $actual, $delta, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsWithDelta', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a condition is not false. + * + * @param $condition + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotFalse() + */ + public function assertNotFalse($condition, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotFalse', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of a given type. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotInstanceOf() + */ + public function assertNotInstanceOf($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotInstanceOf', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not null. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotNull() + */ + public function assertNotNull($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables do not have the same type and value. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotSame() + */ + public function assertNotSame($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Assert that the size of two arrays (or `Countable` or `Traversable` objects) is not the same. + * + * @param Countable|iterable $expected + * @param Countable|iterable $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotSameSize() + */ + public function assertNotSameSize($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSameSize', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a condition is not true. + * + * @param $condition + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotTrue() + */ + public function assertNotTrue($condition, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotTrue', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is null. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNull() + */ + public function assertNull($actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNull', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that an object has a specified attribute. + * + * @param string $attributeName + * @param object $object + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertObjectHasAttribute() + */ + public function assertObjectHasAttribute($attributeName, $object, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertObjectHasAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that an object does not have a specified attribute. + * + * @param string $attributeName + * @param object $object + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertObjectNotHasAttribute() + */ + public function assertObjectNotHasAttribute($attributeName, $object, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertObjectNotHasAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables have the same type and value. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertSame() + */ + public function assertSame($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSame', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Assert that the size of two arrays (or `Countable` or `Traversable` objects) is the same. + * + * @param Countable|iterable $expected + * @param Countable|iterable $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertSameSize() + */ + public function assertSameSize($expected, $actual, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSameSize', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param string $needle + * @param string $haystack + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringContainsString() + */ + public function assertStringContainsString($needle, $haystack, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringContainsString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\AbstractAsserts::assertStringContainsStringIgnoringCase() + */ + public function assertStringContainsStringIgnoringCase($needle, $haystack, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringContainsStringIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string ends not with a given suffix. + * + * @param string $suffix + * @param string $string + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringEndsNotWith() + */ + public function assertStringEndsNotWith($suffix, $string, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEndsNotWith', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string ends with a given suffix. + * + * @param string $suffix + * @param string $string + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringEndsWith() + */ + public function assertStringEndsWith($suffix, $string, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEndsWith', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is equal to the contents of a file. + * + * @param string $expectedFile + * @param string $actualString + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringEqualsFile() + */ + public function assertStringEqualsFile($expectedFile, $actualString, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is equal to the contents of a file (canonicalizing). + * + * @param string $expectedFile + * @param string $actualString + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringEqualsFileCanonicalizing() + */ + public function assertStringEqualsFileCanonicalizing($expectedFile, $actualString, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFileCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is equal to the contents of a file (ignoring case). + * + * @param string $expectedFile + * @param string $actualString + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringEqualsFileIgnoringCase() + */ + public function assertStringEqualsFileIgnoringCase($expectedFile, $actualString, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFileIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string matches a given format string. + * + * @param string $format + * @param string $string + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringMatchesFormat() + */ + public function assertStringMatchesFormat($format, $string, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringMatchesFormat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string matches a given format file. + * + * @param string $formatFile + * @param string $string + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringMatchesFormatFile() + */ + public function assertStringMatchesFormatFile($formatFile, $string, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringMatchesFormatFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param string $needle + * @param string $haystack + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringNotContainsString() + */ + public function assertStringNotContainsString($needle, $haystack, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotContainsString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param string $needle + * @param string $haystack + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringNotContainsStringIgnoringCase() + */ + public function assertStringNotContainsStringIgnoringCase($needle, $haystack, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotContainsStringIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is not equal to the contents of a file. + * + * @param string $expectedFile + * @param string $actualString + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringNotEqualsFile() + */ + public function assertStringNotEqualsFile($expectedFile, $actualString, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is not equal to the contents of a file (canonicalizing). + * @param string $expectedFile + * @param string $actualString + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringNotEqualsFileCanonicalizing() + */ + public function assertStringNotEqualsFileCanonicalizing($expectedFile, $actualString, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFileCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is not equal to the contents of a file (ignoring case). + * + * @param string $expectedFile + * @param string $actualString + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringNotEqualsFileIgnoringCase() + */ + public function assertStringNotEqualsFileIgnoringCase($expectedFile, $actualString, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFileIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string does not match a given format string. + * + * @param string $format + * @param string $string + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringNotMatchesFormat() + */ + public function assertStringNotMatchesFormat($format, $string, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotMatchesFormat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string does not match a given format string. + * + * @param string $formatFile + * @param string $string + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringNotMatchesFormatFile() + */ + public function assertStringNotMatchesFormatFile($formatFile, $string, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotMatchesFormatFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string starts not with a given prefix. + * + * @param string $prefix + * @param string $string + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringStartsNotWith() + */ + public function assertStringStartsNotWith($prefix, $string, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringStartsNotWith', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string starts with a given prefix. + * + * @param string $prefix + * @param string $string + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringStartsWith() + */ + public function assertStringStartsWith($prefix, $string, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringStartsWith', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Evaluates a PHPUnit\Framework\Constraint matcher object. + * + * @param $value + * @param Constraint $constraint + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertThat() + */ + public function assertThat($value, $constraint, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertThat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a condition is true. + * + * @param $condition + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertTrue() + */ + public function assertTrue($condition, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertTrue', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML files are equal. + * + * @param string $expectedFile + * @param string $actualFile + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertXmlFileEqualsXmlFile() + */ + public function assertXmlFileEqualsXmlFile($expectedFile, $actualFile, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlFileEqualsXmlFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML files are not equal. + * + * @param string $expectedFile + * @param string $actualFile + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertXmlFileNotEqualsXmlFile() + */ + public function assertXmlFileNotEqualsXmlFile($expectedFile, $actualFile, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlFileNotEqualsXmlFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML documents are equal. + * + * @param string $expectedFile + * @param DOMDocument|string $actualXml + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertXmlStringEqualsXmlFile() + */ + public function assertXmlStringEqualsXmlFile($expectedFile, $actualXml, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringEqualsXmlFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML documents are equal. + * + * @param DOMDocument|string $expectedXml + * @param DOMDocument|string $actualXml + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertXmlStringEqualsXmlString() + */ + public function assertXmlStringEqualsXmlString($expectedXml, $actualXml, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringEqualsXmlString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML documents are not equal. + * + * @param string $expectedFile + * @param DOMDocument|string $actualXml + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertXmlStringNotEqualsXmlFile() + */ + public function assertXmlStringNotEqualsXmlFile($expectedFile, $actualXml, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringNotEqualsXmlFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML documents are not equal. + * + * @param DOMDocument|string $expectedXml + * @param DOMDocument|string $actualXml + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertXmlStringNotEqualsXmlString() + */ + public function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, $message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringNotEqualsXmlString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Fails a test with the given message. + * + * @param string $message + * @see \Codeception\Module\AbstractAsserts::fail() + */ + public function fail($message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('fail', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Mark the test as incomplete. + * + * @param string $message + * @see \Codeception\Module\AbstractAsserts::markTestIncomplete() + */ + public function markTestIncomplete($message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('markTestIncomplete', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Mark the test as skipped. + * + * @param string $message + * @see \Codeception\Module\AbstractAsserts::markTestSkipped() + */ + public function markTestSkipped($message = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('markTestSkipped', func_get_args())); + } +} |
