aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Eibrink-Lunzenauer <lunzenauer@elan-ev.de>2024-07-09 08:38:31 +0000
committerMarcus Eibrink-Lunzenauer <lunzenauer@elan-ev.de>2024-07-09 08:38:31 +0000
commit7102798d319ad67cede056474e39053e7a20f637 (patch)
tree86fd6dbf2a3071eb69507dd91a16c3298f768bea
parentcb5b07a6418ca08bf490565e26a17b1951bc035e (diff)
Replace `slim/psr7` with `nyholm/psr7`.
Closes #4362 Merge request studip/studip!3186
-rw-r--r--composer.json6
-rw-r--r--composer.lock446
-rw-r--r--lib/bootstrap-definitions.php12
-rw-r--r--lib/classes/JsonApi/JsonApiController.php53
-rw-r--r--lib/classes/JsonApi/JsonApiIntegration/Responses.php27
-rw-r--r--lib/classes/JsonApi/Middlewares/Authentication.php7
-rw-r--r--lib/classes/JsonApi/Middlewares/DangerousRouteHandler.php1
-rw-r--r--lib/classes/JsonApi/Middlewares/RemoveTrailingSlashes.php12
-rw-r--r--lib/classes/JsonApi/Routes/Avatar/AvatarUpload.php7
-rw-r--r--lib/classes/JsonApi/Routes/Files/FileRefsContentShow.php11
-rw-r--r--lib/classes/JsonApi/Routes/Files/RoutesHelperTrait.php8
-rw-r--r--lib/classes/JsonApi/Routes/Holidays/HolidaysShow.php13
-rw-r--r--lib/classes/JsonApi/Routes/StockImages/StockImagesUpload.php8
-rw-r--r--lib/classes/JsonApi/dependencies.php7
-rw-r--r--lib/classes/JsonApi/middleware.php2
-rw-r--r--lib/classes/JsonApi/routes.php2
-rw-r--r--lib/classes/LtiLink.php11
-rw-r--r--lib/classes/OAuth2/NegotiatesWithPsr7.php6
-rw-r--r--tests/_support/Helper/Jsonapi.php28
-rw-r--r--tests/_support/_generated/FunctionalTesterActions.php4
-rw-r--r--tests/_support/_generated/JsonapiTesterActions.php815
-rw-r--r--tests/_support/_generated/UnitTesterActions.php813
-rw-r--r--tests/jsonapi/FileRefsCreateTest.php30
-rw-r--r--tests/unit/lib/classes/OAuth1Test.php5
24 files changed, 729 insertions, 1605 deletions
diff --git a/composer.json b/composer.json
index 47135bd..e7fb7e5 100644
--- a/composer.json
+++ b/composer.json
@@ -78,7 +78,6 @@
},
"require": {
"php": "^8.1",
- "guzzlehttp/psr7": "2.6.2",
"spomky-labs/otphp": "11.2.2",
"tuupola/cors-middleware": "^1.2.1",
"tecnickcom/tcpdf": "6.7.5",
@@ -103,7 +102,6 @@
"ext-mbstring": "*",
"ext-dom": "*",
"opis/json-schema": "2.3.0",
- "slim/psr7": "1.6.1",
"slim/slim": "4.13.0",
"php-di/php-di": "7.0.0",
"symfony/console": "6.4.7",
@@ -123,7 +121,9 @@
"illuminate/collections": "^10.48",
"symfony/polyfill-php82": "1.30.0",
"symfony/polyfill-php83": "1.30.0",
- "symfony/polyfill-php84": "1.30.0"
+ "symfony/polyfill-php84": "1.30.0",
+ "nyholm/psr7": "1.8.1",
+ "nyholm/psr7-server": "1.1.0"
},
"replace": {
"symfony/polyfill-php73": "*",
diff --git a/composer.lock b/composer.lock
index 7ece25b..8af2df6 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "5ca23c870b39d4f33977840a0e344a20",
+ "content-hash": "4d8cd43aecf3277942d94871e22bf861",
"packages": [
{
"name": "algo26-matthias/idna-convert",
@@ -299,62 +299,6 @@
"time": "2023-11-17T15:01:25+00:00"
},
{
- "name": "fig/http-message-util",
- "version": "1.1.5",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/http-message-util.git",
- "reference": "9d94dc0154230ac39e5bf89398b324a86f63f765"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-message-util/zipball/9d94dc0154230ac39e5bf89398b324a86f63f765",
- "reference": "9d94dc0154230ac39e5bf89398b324a86f63f765",
- "shasum": ""
- },
- "require": {
- "php": "^5.3 || ^7.0 || ^8.0"
- },
- "suggest": {
- "psr/http-message": "The package containing the PSR-7 interfaces"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.1.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Fig\\Http\\Message\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "https://www.php-fig.org/"
- }
- ],
- "description": "Utility classes and constants for use with PSR-7 (psr/http-message)",
- "keywords": [
- "http",
- "http-message",
- "psr",
- "psr-7",
- "request",
- "response"
- ],
- "support": {
- "issues": "https://github.com/php-fig/http-message-util/issues",
- "source": "https://github.com/php-fig/http-message-util/tree/1.1.5"
- },
- "time": "2020-11-24T22:02:12+00:00"
- },
- {
"name": "graham-campbell/result-type",
"version": "v1.1.2",
"source": {
@@ -417,122 +361,6 @@
"time": "2023-11-12T22:16:48+00:00"
},
{
- "name": "guzzlehttp/psr7",
- "version": "2.6.2",
- "source": {
- "type": "git",
- "url": "https://github.com/guzzle/psr7.git",
- "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221",
- "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221",
- "shasum": ""
- },
- "require": {
- "php": "^7.2.5 || ^8.0",
- "psr/http-factory": "^1.0",
- "psr/http-message": "^1.1 || ^2.0",
- "ralouphie/getallheaders": "^3.0"
- },
- "provide": {
- "psr/http-factory-implementation": "1.0",
- "psr/http-message-implementation": "1.0"
- },
- "require-dev": {
- "bamarni/composer-bin-plugin": "^1.8.2",
- "http-interop/http-factory-tests": "^0.9",
- "phpunit/phpunit": "^8.5.36 || ^9.6.15"
- },
- "suggest": {
- "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
- },
- "type": "library",
- "extra": {
- "bamarni-bin": {
- "bin-links": true,
- "forward-command": false
- }
- },
- "autoload": {
- "psr-4": {
- "GuzzleHttp\\Psr7\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Graham Campbell",
- "email": "hello@gjcampbell.co.uk",
- "homepage": "https://github.com/GrahamCampbell"
- },
- {
- "name": "Michael Dowling",
- "email": "mtdowling@gmail.com",
- "homepage": "https://github.com/mtdowling"
- },
- {
- "name": "George Mponos",
- "email": "gmponos@gmail.com",
- "homepage": "https://github.com/gmponos"
- },
- {
- "name": "Tobias Nyholm",
- "email": "tobias.nyholm@gmail.com",
- "homepage": "https://github.com/Nyholm"
- },
- {
- "name": "Márk Sági-Kazár",
- "email": "mark.sagikazar@gmail.com",
- "homepage": "https://github.com/sagikazarmark"
- },
- {
- "name": "Tobias Schultze",
- "email": "webmaster@tubo-world.de",
- "homepage": "https://github.com/Tobion"
- },
- {
- "name": "Márk Sági-Kazár",
- "email": "mark.sagikazar@gmail.com",
- "homepage": "https://sagikazarmark.hu"
- }
- ],
- "description": "PSR-7 message implementation that also provides common utility methods",
- "keywords": [
- "http",
- "message",
- "psr-7",
- "request",
- "response",
- "stream",
- "uri",
- "url"
- ],
- "support": {
- "issues": "https://github.com/guzzle/psr7/issues",
- "source": "https://github.com/guzzle/psr7/tree/2.6.2"
- },
- "funding": [
- {
- "url": "https://github.com/GrahamCampbell",
- "type": "github"
- },
- {
- "url": "https://github.com/Nyholm",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7",
- "type": "tidelift"
- }
- ],
- "time": "2023-12-03T20:05:35+00:00"
- },
- {
"name": "illuminate/collections",
"version": "v10.48.12",
"source": {
@@ -1912,6 +1740,150 @@
"time": "2024-03-05T20:51:40+00:00"
},
{
+ "name": "nyholm/psr7",
+ "version": "1.8.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Nyholm/psr7.git",
+ "reference": "aa5fc277a4f5508013d571341ade0c3886d4d00e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Nyholm/psr7/zipball/aa5fc277a4f5508013d571341ade0c3886d4d00e",
+ "reference": "aa5fc277a4f5508013d571341ade0c3886d4d00e",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2",
+ "psr/http-factory": "^1.0",
+ "psr/http-message": "^1.1 || ^2.0"
+ },
+ "provide": {
+ "php-http/message-factory-implementation": "1.0",
+ "psr/http-factory-implementation": "1.0",
+ "psr/http-message-implementation": "1.0"
+ },
+ "require-dev": {
+ "http-interop/http-factory-tests": "^0.9",
+ "php-http/message-factory": "^1.0",
+ "php-http/psr7-integration-tests": "^1.0",
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.4",
+ "symfony/error-handler": "^4.4"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.8-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Nyholm\\Psr7\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Tobias Nyholm",
+ "email": "tobias.nyholm@gmail.com"
+ },
+ {
+ "name": "Martijn van der Ven",
+ "email": "martijn@vanderven.se"
+ }
+ ],
+ "description": "A fast PHP7 implementation of PSR-7",
+ "homepage": "https://tnyholm.se",
+ "keywords": [
+ "psr-17",
+ "psr-7"
+ ],
+ "support": {
+ "issues": "https://github.com/Nyholm/psr7/issues",
+ "source": "https://github.com/Nyholm/psr7/tree/1.8.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/Zegnat",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/nyholm",
+ "type": "github"
+ }
+ ],
+ "time": "2023-11-13T09:31:12+00:00"
+ },
+ {
+ "name": "nyholm/psr7-server",
+ "version": "1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Nyholm/psr7-server.git",
+ "reference": "4335801d851f554ca43fa6e7d2602141538854dc"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Nyholm/psr7-server/zipball/4335801d851f554ca43fa6e7d2602141538854dc",
+ "reference": "4335801d851f554ca43fa6e7d2602141538854dc",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1 || ^8.0",
+ "psr/http-factory": "^1.0",
+ "psr/http-message": "^1.0 || ^2.0"
+ },
+ "require-dev": {
+ "nyholm/nsa": "^1.1",
+ "nyholm/psr7": "^1.3",
+ "phpunit/phpunit": "^7.0 || ^8.5 || ^9.3"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Nyholm\\Psr7Server\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Tobias Nyholm",
+ "email": "tobias.nyholm@gmail.com"
+ },
+ {
+ "name": "Martijn van der Ven",
+ "email": "martijn@vanderven.se"
+ }
+ ],
+ "description": "Helper classes to handle PSR-7 server requests",
+ "homepage": "http://tnyholm.se",
+ "keywords": [
+ "psr-17",
+ "psr-7"
+ ],
+ "support": {
+ "issues": "https://github.com/Nyholm/psr7-server/issues",
+ "source": "https://github.com/Nyholm/psr7-server/tree/1.1.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/Zegnat",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/nyholm",
+ "type": "github"
+ }
+ ],
+ "time": "2023-11-08T09:30:43+00:00"
+ },
+ {
"name": "okvpn/clock-lts",
"version": "1.0.0",
"source": {
@@ -3411,50 +3383,6 @@
"time": "2024-04-02T15:57:53+00:00"
},
{
- "name": "ralouphie/getallheaders",
- "version": "3.0.3",
- "source": {
- "type": "git",
- "url": "https://github.com/ralouphie/getallheaders.git",
- "reference": "120b605dfeb996808c31b6477290a714d356e822"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
- "reference": "120b605dfeb996808c31b6477290a714d356e822",
- "shasum": ""
- },
- "require": {
- "php": ">=5.6"
- },
- "require-dev": {
- "php-coveralls/php-coveralls": "^2.1",
- "phpunit/phpunit": "^5 || ^6.5"
- },
- "type": "library",
- "autoload": {
- "files": [
- "src/getallheaders.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Ralph Khattar",
- "email": "ralph.khattar@gmail.com"
- }
- ],
- "description": "A polyfill for getallheaders.",
- "support": {
- "issues": "https://github.com/ralouphie/getallheaders/issues",
- "source": "https://github.com/ralouphie/getallheaders/tree/develop"
- },
- "time": "2019-03-08T08:55:37+00:00"
- },
- {
"name": "scssphp/scssphp",
"version": "v1.12.1",
"source": {
@@ -3535,88 +3463,6 @@
"time": "2024-01-13T12:36:40+00:00"
},
{
- "name": "slim/psr7",
- "version": "1.6.1",
- "source": {
- "type": "git",
- "url": "https://github.com/slimphp/Slim-Psr7.git",
- "reference": "72d2b2bac94ab4575d369f605dbfafbe168d3163"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/slimphp/Slim-Psr7/zipball/72d2b2bac94ab4575d369f605dbfafbe168d3163",
- "reference": "72d2b2bac94ab4575d369f605dbfafbe168d3163",
- "shasum": ""
- },
- "require": {
- "fig/http-message-util": "^1.1.5",
- "php": "^7.4 || ^8.0",
- "psr/http-factory": "^1.0",
- "psr/http-message": "^1.0",
- "ralouphie/getallheaders": "^3.0",
- "symfony/polyfill-php80": "^1.26"
- },
- "provide": {
- "psr/http-factory-implementation": "1.0",
- "psr/http-message-implementation": "1.0"
- },
- "require-dev": {
- "adriansuter/php-autoload-override": "^1.3",
- "ext-json": "*",
- "http-interop/http-factory-tests": "^0.9.0",
- "php-http/psr7-integration-tests": "1.1",
- "phpspec/prophecy": "^1.15",
- "phpspec/prophecy-phpunit": "^2.0",
- "phpstan/phpstan": "^1.8",
- "phpunit/phpunit": "^9.5",
- "squizlabs/php_codesniffer": "^3.7"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Slim\\Psr7\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Josh Lockhart",
- "email": "hello@joshlockhart.com",
- "homepage": "http://joshlockhart.com"
- },
- {
- "name": "Andrew Smith",
- "email": "a.smith@silentworks.co.uk",
- "homepage": "http://silentworks.co.uk"
- },
- {
- "name": "Rob Allen",
- "email": "rob@akrabat.com",
- "homepage": "http://akrabat.com"
- },
- {
- "name": "Pierre Berube",
- "email": "pierre@lgse.com",
- "homepage": "http://www.lgse.com"
- }
- ],
- "description": "Strict PSR-7 implementation",
- "homepage": "https://www.slimframework.com",
- "keywords": [
- "http",
- "psr-7",
- "psr7"
- ],
- "support": {
- "issues": "https://github.com/slimphp/Slim-Psr7/issues",
- "source": "https://github.com/slimphp/Slim-Psr7/tree/1.6.1"
- },
- "time": "2023-04-17T16:02:20+00:00"
- },
- {
"name": "slim/slim",
"version": "4.13.0",
"source": {
@@ -8371,5 +8217,5 @@
"platform-overrides": {
"php": "8.1"
},
- "plugin-api-version": "2.6.0"
+ "plugin-api-version": "2.2.0"
}
diff --git a/lib/bootstrap-definitions.php b/lib/bootstrap-definitions.php
index e3bf88a..7d4f93b 100644
--- a/lib/bootstrap-definitions.php
+++ b/lib/bootstrap-definitions.php
@@ -8,6 +8,8 @@ use DebugBar\DataCollector\RequestDataCollector;
use DebugBar\DataCollector\TimeDataCollector;
use Monolog\Handler\StreamHandler;
use Monolog\Logger;
+use Nyholm\Psr7\Factory\Psr17Factory;
+use Nyholm\Psr7Server\ServerRequestCreator;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;
@@ -68,4 +70,14 @@ return [
return $pdo;
}),
PluginManager::class => DI\factory([PluginManager::class, 'getInstance']),
+
+ // PSR-17 HTTP Factories
+ \Psr\Http\Message\RequestFactoryInterface::class => DI\get(Psr17Factory::class),
+ \Psr\Http\Message\ResponseFactoryInterface::class => DI\get(Psr17Factory::class),
+ \Psr\Http\Message\ServerRequestFactoryInterface::class => DI\get(Psr17Factory::class),
+ \Psr\Http\Message\StreamFactoryInterface::class => DI\get(Psr17Factory::class),
+ \Psr\Http\Message\UploadedFileFactoryInterface::class => DI\get(Psr17Factory::class),
+ \Psr\Http\Message\UriFactoryInterface::class => DI\get(Psr17Factory::class),
+
+ \Psr\Http\Message\ServerRequestInterface::class => DI\factory([ServerRequestCreator::class, 'fromGlobals']),
];
diff --git a/lib/classes/JsonApi/JsonApiController.php b/lib/classes/JsonApi/JsonApiController.php
index 614650d..a60c0e2 100644
--- a/lib/classes/JsonApi/JsonApiController.php
+++ b/lib/classes/JsonApi/JsonApiController.php
@@ -15,6 +15,7 @@ use Neomerx\JsonApi\Contracts\Schema\SchemaInterface;
use Neomerx\JsonApi\Http\Headers\MediaType;
use Neomerx\JsonApi\Schema\Link;
use Psr\Container\ContainerInterface;
+use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
@@ -39,54 +40,18 @@ use Psr\Http\Message\ServerRequestInterface as Request;
class JsonApiController
{
/**
- * @var \Slim\App
- */
- protected $app;
-
- /**
- * @var ContainerInterface;
- */
- protected $container;
-
- /**
- * @var FactoryInterface
- */
- protected $factory;
-
- /**
- * @var EncoderInterface
- */
- protected $encoder;
-
- /**
- * @var SchemaContainerInterface
- */
- protected $schemaContainer;
-
- /**
- * @var QueryParserInterface
- */
- protected $queryParser;
-
- /**
* Der Konstruktor.
*/
public function __construct(
- \Slim\App $app,
- ContainerInterface $container,
- FactoryInterface $factory,
- EncoderInterface $encoder,
- SchemaContainerInterface $schemaContainer,
- QueryParserInterface $queryParser,
+ protected \Slim\App $app,
+ protected ContainerInterface $container,
+ protected FactoryInterface $factory,
+ protected EncoderInterface $encoder,
+ protected SchemaContainerInterface $schemaContainer,
+ protected QueryParserInterface $queryParser,
+ protected ResponseFactoryInterface $responseFactory,
HeaderParametersParserInterface $headerParametersParser
) {
- $this->app = $app;
- $this->container = $container;
- $this->factory = $factory;
- $this->encoder = $encoder;
- $this->schemaContainer = $schemaContainer;
- $this->queryParser = $queryParser;
-
$queryChecker = new JsonApiIntegration\QueryChecker(
$this->allowUnrecognizedParams,
$this->allowedIncludePaths,
@@ -410,7 +375,7 @@ class JsonApiController
$mediaType = new MediaType(MediaTypeInterface::JSON_API_TYPE, MediaTypeInterface::JSON_API_SUB_TYPE);
- return new JsonApiIntegration\Responses($encoder, $mediaType);
+ return new JsonApiIntegration\Responses($encoder, $mediaType, $this->responseFactory);
}
private function checkAcceptHeader(HeaderParametersParserInterface $headerParametersParser): void
diff --git a/lib/classes/JsonApi/JsonApiIntegration/Responses.php b/lib/classes/JsonApi/JsonApiIntegration/Responses.php
index 0b8ccb5..8c9fbfd 100644
--- a/lib/classes/JsonApi/JsonApiIntegration/Responses.php
+++ b/lib/classes/JsonApi/JsonApiIntegration/Responses.php
@@ -5,12 +5,10 @@ namespace JsonApi\JsonApiIntegration;
use Neomerx\JsonApi\Http\BaseResponses;
use Neomerx\JsonApi\Contracts\Encoder\EncoderInterface;
use Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface;
-use Slim\Psr7\Headers;
-use Slim\Psr7\Response;
-
use Neomerx\JsonApi\Contracts\Encoder\Parameters\EncodingParametersInterface;
use Neomerx\JsonApi\Contracts\Http\Headers\SupportedExtensionsInterface;
use Neomerx\JsonApi\Contracts\Schema\ContainerInterface;
+use Psr\Http\Message\ResponseFactoryInterface;
/**
* Diese Factory-Klasse verknüpft die "neomerx/json-api"-Bibliothek mit der
@@ -19,22 +17,11 @@ use Neomerx\JsonApi\Contracts\Schema\ContainerInterface;
*/
class Responses extends BaseResponses
{
- /**
- * @var EncoderInterface
- */
- private $encoder;
-
- /**
- * @var MediaTypeInterface
- */
- private $outputMediaType;
-
public function __construct(
- EncoderInterface $encoder,
- MediaTypeInterface $outputMediaType
+ private EncoderInterface $encoder,
+ private MediaTypeInterface $outputMediaType,
+ private ResponseFactoryInterface $responseFactory
) {
- $this->encoder = $encoder;
- $this->outputMediaType = $outputMediaType;
}
/**
@@ -51,8 +38,10 @@ class Responses extends BaseResponses
*/
protected function createResponse(?string $content, int $statusCode, array $headers)
{
- $headers = new Headers($headers);
- $response = new Response($statusCode, $headers);
+ $response = $this->responseFactory->createResponse($statusCode);
+ foreach ($headers as $header => $value) {
+ $response = $response->withHeader($header, $value);
+ }
$response->getBody()->write($content ?? '');
return $response->withProtocolVersion('1.1');
diff --git a/lib/classes/JsonApi/Middlewares/Authentication.php b/lib/classes/JsonApi/Middlewares/Authentication.php
index bbcfef1..19da101 100644
--- a/lib/classes/JsonApi/Middlewares/Authentication.php
+++ b/lib/classes/JsonApi/Middlewares/Authentication.php
@@ -2,10 +2,10 @@
namespace JsonApi\Middlewares;
+use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Server\RequestHandlerInterface as RequestHandler;
-use Slim\Psr7\Response;
class Authentication
{
@@ -58,9 +58,10 @@ class Authentication
}
// according to RFC 2616
- private function generateChallenges(array $guards): Response
+ private function generateChallenges(array $guards): ResponseInterface
{
- $response = new Response(401);
+ $responseFactory = app(ResponseFactoryInterface::class);
+ $response = $responseFactory->createResponse(401);
foreach ($guards as $guard) {
$response = $guard->addChallenge($response);
diff --git a/lib/classes/JsonApi/Middlewares/DangerousRouteHandler.php b/lib/classes/JsonApi/Middlewares/DangerousRouteHandler.php
index 8ff7880..d1112f8 100644
--- a/lib/classes/JsonApi/Middlewares/DangerousRouteHandler.php
+++ b/lib/classes/JsonApi/Middlewares/DangerousRouteHandler.php
@@ -5,7 +5,6 @@ namespace JsonApi\Middlewares;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Server\RequestHandlerInterface as RequestHandler;
-use Slim\Psr7\Response;
/**
* TODO.
diff --git a/lib/classes/JsonApi/Middlewares/RemoveTrailingSlashes.php b/lib/classes/JsonApi/Middlewares/RemoveTrailingSlashes.php
index 3a16702..428e0b1 100644
--- a/lib/classes/JsonApi/Middlewares/RemoveTrailingSlashes.php
+++ b/lib/classes/JsonApi/Middlewares/RemoveTrailingSlashes.php
@@ -2,10 +2,10 @@
namespace JsonApi\Middlewares;
+use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Server\RequestHandlerInterface as RequestHandler;
-use Slim\Psr7\Response;
/**
* Diese Klasse definiert eine Middleware, die Requests umleitet,
@@ -14,6 +14,10 @@ use Slim\Psr7\Response;
*/
class RemoveTrailingSlashes
{
+ public function __construct(private ResponseFactoryInterface $responseFactory)
+ {
+ }
+
/**
* Diese Middleware überprüft den Pfad der URI des Requests. Endet
* diese auf einem Schrägstrich, wird nicht weiter an `$next`
@@ -39,11 +43,7 @@ class RemoveTrailingSlashes
$uri = $uri->withPath($path);
if ('GET' == $request->getMethod()) {
- $response = new Response();
-
- return $response
- ->withHeader('Location', (string) $uri)
- ->withStatus(301);
+ return $this->responseFactory->createResponse(301)->withHeader('Location', (string) $uri);
} else {
$request = $request->withUri($uri);
}
diff --git a/lib/classes/JsonApi/Routes/Avatar/AvatarUpload.php b/lib/classes/JsonApi/Routes/Avatar/AvatarUpload.php
index 777d65c..de50fb2 100644
--- a/lib/classes/JsonApi/Routes/Avatar/AvatarUpload.php
+++ b/lib/classes/JsonApi/Routes/Avatar/AvatarUpload.php
@@ -10,7 +10,6 @@ use JsonApi\NonJsonApiController;
use JsonApi\Routes\Files\RoutesHelperTrait as FilesRoutesHelper;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
-use Slim\Psr7\UploadedFile;
/**
* Create an Avatar.
@@ -43,8 +42,8 @@ class AvatarUpload extends NonJsonApiController
// Use new image file for avatar creation.
$avatar->createFrom($filename);
-
-
+
+
return $response->withStatus(201);
}
@@ -63,4 +62,4 @@ class AvatarUpload extends NonJsonApiController
return 'New avatar must have a `image`.';
}
}
-} \ No newline at end of file
+}
diff --git a/lib/classes/JsonApi/Routes/Files/FileRefsContentShow.php b/lib/classes/JsonApi/Routes/Files/FileRefsContentShow.php
index e2d19c4..69f71ec 100644
--- a/lib/classes/JsonApi/Routes/Files/FileRefsContentShow.php
+++ b/lib/classes/JsonApi/Routes/Files/FileRefsContentShow.php
@@ -6,14 +6,21 @@ use JsonApi\Errors\AuthorizationFailedException;
use JsonApi\Errors\InternalServerError;
use JsonApi\Errors\RecordNotFoundException;
use JsonApi\NonJsonApiController;
-use GuzzleHttp\Psr7;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
+use Psr\Http\Message\StreamFactoryInterface;
class FileRefsContentShow extends NonJsonApiController
{
use EtagHelperTrait;
+ public function __construct(
+ ContainerInterface $container,
+ private StreamFactoryInterface $streamFactory
+ ) {
+ parent::__construct($container);
+ }
+
public function invoke(Request $request, Response $response, array $args): Response
{
if (!$fileRef = \FileRef::find($args['id'])) {
@@ -114,7 +121,7 @@ class FileRefsContentShow extends NonJsonApiController
$fileRef->incrementDownloadCounter();
- $stream = Psr7\Utils::streamFor(fopen($pathFile, 'rb'));
+ $stream = $this->streamFactory->createStreamFromFile($pathFile, 'rb');
return $response->withBody($stream);
}
diff --git a/lib/classes/JsonApi/Routes/Files/RoutesHelperTrait.php b/lib/classes/JsonApi/Routes/Files/RoutesHelperTrait.php
index cc8785e..fea4f16 100644
--- a/lib/classes/JsonApi/Routes/Files/RoutesHelperTrait.php
+++ b/lib/classes/JsonApi/Routes/Files/RoutesHelperTrait.php
@@ -10,7 +10,7 @@ use JsonApi\Schemas\Folder as FolderSchema;
use JsonApi\Schemas\ContentTermsOfUse as ContentTermsOfUseSchema;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
-use Slim\Psr7\UploadedFile;
+use Psr\Http\Message\UploadedFileInterface;
trait RoutesHelperTrait
{
@@ -256,12 +256,12 @@ trait RoutesHelperTrait
* Moves the uploaded file to the upload directory and assigns it a unique name
* to avoid overwriting an existing uploaded file.
*
- * @param string $directory directory to which the file is moved
- * @param UploadedFile $uploaded file uploaded file to move
+ * @param string $directory directory to which the file is moved
+ * @param UploadedFileInterface $uploaded file uploaded file to move
*
* @return string filename of moved file
*/
- protected function moveUploadedFile($directory, UploadedFile $uploadedFile)
+ protected function moveUploadedFile($directory, UploadedFileInterface $uploadedFile)
{
$extension = pathinfo($uploadedFile->getClientFilename(), PATHINFO_EXTENSION);
$basename = bin2hex(random_bytes(8));
diff --git a/lib/classes/JsonApi/Routes/Holidays/HolidaysShow.php b/lib/classes/JsonApi/Routes/Holidays/HolidaysShow.php
index ef3fa61..a587dca 100644
--- a/lib/classes/JsonApi/Routes/Holidays/HolidaysShow.php
+++ b/lib/classes/JsonApi/Routes/Holidays/HolidaysShow.php
@@ -2,15 +2,15 @@
namespace JsonApi\Routes\Holidays;
-use GuzzleHttp\Psr7;
use JsonApi\JsonApiIntegration\QueryParserInterface;
use JsonApi\NonJsonApiController;
use Neomerx\JsonApi\Exceptions\JsonApiException;
use Neomerx\JsonApi\Schema\Error;
use Neomerx\JsonApi\Schema\ErrorCollection;
use Psr\Container\ContainerInterface;
-use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
+use Psr\Http\Message\ServerRequestInterface as Request;
+use Psr\Http\Message\StreamFactoryInterface;
/**
* List all holidays for a specific time period.
@@ -23,17 +23,14 @@ use Psr\Http\Message\ResponseInterface as Response;
*/
final class HolidaysShow extends NonJsonApiController
{
- private $query_parser;
-
protected $allowedFilteringParameters = ['year', 'month', 'day'];
public function __construct(
ContainerInterface $container,
- QueryParserInterface $queryParser
+ private QueryParserInterface $queryParser,
+ private StreamFactoryInterface $streamFactory
) {
parent::__construct($container);
-
- $this->query_parser = $queryParser;
}
public function __invoke(Request $request, Response $response, $args): Response
@@ -55,7 +52,7 @@ final class HolidaysShow extends NonJsonApiController
return $response
->withHeader('Content-Type', 'application/json')
- ->withBody(Psr7\Utils::streamFor(json_encode($holidays)));
+ ->withBody($this->streamFactory->createStream(json_encode($holidays)));
}
private function getTimespanByFilters(): array
diff --git a/lib/classes/JsonApi/Routes/StockImages/StockImagesUpload.php b/lib/classes/JsonApi/Routes/StockImages/StockImagesUpload.php
index b05b370..c423117 100644
--- a/lib/classes/JsonApi/Routes/StockImages/StockImagesUpload.php
+++ b/lib/classes/JsonApi/Routes/StockImages/StockImagesUpload.php
@@ -8,7 +8,7 @@ use JsonApi\Errors\RecordNotFoundException;
use JsonApi\NonJsonApiController;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
-use Slim\Psr7\UploadedFile;
+use Psr\Http\Message\UploadedFileInterface;
use Studip\StockImages\Scaler;
use Studip\StockImages\PaletteCreator;
@@ -58,7 +58,7 @@ class StockImagesUpload extends NonJsonApiController
$resource->store();
}
- private function getUploadedFile(Request $request): UploadedFile
+ private function getUploadedFile(Request $request): UploadedFileInterface
{
$files = iterator_to_array($this->getUploadedFiles($request));
@@ -79,7 +79,7 @@ class StockImagesUpload extends NonJsonApiController
}
/**
- * @return iterable<UploadedFile> a list of uploaded files
+ * @return iterable<UploadedFileInterface> a list of uploaded files
*/
private function getUploadedFiles(Request $request): iterable
{
@@ -113,7 +113,7 @@ class StockImagesUpload extends NonJsonApiController
/**
* @return string|null null, if the file is valid, otherwise a string containing the error
*/
- private function validate(UploadedFile $file)
+ private function validate(UploadedFileInterface $file)
{
$mimeType = $file->getClientMediaType();
if (!in_array($mimeType, ['image/gif', 'image/jpeg', 'image/png', 'image/webp'])) {
diff --git a/lib/classes/JsonApi/dependencies.php b/lib/classes/JsonApi/dependencies.php
index 904c817..78ed85d 100644
--- a/lib/classes/JsonApi/dependencies.php
+++ b/lib/classes/JsonApi/dependencies.php
@@ -18,6 +18,7 @@ use Psr\Container\ContainerInterface;
return function (ContainerBuilder $containerBuilder) {
$containerBuilder->addDefinitions([
FactoryInterface::class => \DI\create(JsonApiIntegration\Factory::class),
+
HeaderParametersParserInterface::class => function (FactoryInterface $factory) {
return new HeaderParametersParser($factory);
},
@@ -52,11 +53,5 @@ return function (ContainerBuilder $containerBuilder) {
return $queryParser;
},
-
- ResponsesInterface::class => function (EncoderInterface $encoder) {
- $mediaType = new MediaType(MediaTypeInterface::JSON_API_TYPE, MediaTypeInterface::JSON_API_SUB_TYPE);
-
- return new JsonApiIntegration\Responses($encoder, $mediaType);
- },
]);
};
diff --git a/lib/classes/JsonApi/middleware.php b/lib/classes/JsonApi/middleware.php
index e00b41b..28d1bf7 100644
--- a/lib/classes/JsonApi/middleware.php
+++ b/lib/classes/JsonApi/middleware.php
@@ -21,7 +21,7 @@ return function (App $app) {
});
$app->add(new Middlewares\StudipMockNavigation());
- $app->add(new Middlewares\RemoveTrailingSlashes());
+ $app->add(Middlewares\RemoveTrailingSlashes::class);
// Add Routing Middleware
$app->addRoutingMiddleware();
diff --git a/lib/classes/JsonApi/routes.php b/lib/classes/JsonApi/routes.php
index c0f5003..5132f55 100644
--- a/lib/classes/JsonApi/routes.php
+++ b/lib/classes/JsonApi/routes.php
@@ -4,5 +4,5 @@ namespace JsonApi;
use Slim\App;
return function (App $app) {
- $app->group('/v1', new RouteMap($app));
+ $app->group('/v1', RouteMap::class);
};
diff --git a/lib/classes/LtiLink.php b/lib/classes/LtiLink.php
index 1423cef..88f4e36 100644
--- a/lib/classes/LtiLink.php
+++ b/lib/classes/LtiLink.php
@@ -1,4 +1,7 @@
<?php
+
+use Psr\Http\Message\RequestFactoryInterface;
+
/**
* LtiLink.php - LTI 1.x link representation for Stud.IP
*
@@ -310,11 +313,11 @@ class LtiLink
// posted form data will always use CR LF
$launch_params = preg_replace("/\r?\n/", "\r\n", $launch_params);
+ $requestFactory = app(RequestFactoryInterface::class);
+ $request = $requestFactory->createRequest('POST', $launch_url);
+
return Studip\OAuth1::signRequest(
- (new Slim\Psr7\Factory\ServerRequestFactory())->createServerRequest(
- 'POST',
- $launch_url
- )->withQueryParams($launch_params),
+ $request->withQueryParams($launch_params),
$this->consumer_secret,
'',
$this->oauth_signature_method
diff --git a/lib/classes/OAuth2/NegotiatesWithPsr7.php b/lib/classes/OAuth2/NegotiatesWithPsr7.php
index b2ee5a1..09197f4 100644
--- a/lib/classes/OAuth2/NegotiatesWithPsr7.php
+++ b/lib/classes/OAuth2/NegotiatesWithPsr7.php
@@ -2,21 +2,21 @@
namespace Studip\OAuth2;
+use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
-use Slim\Psr7\Response;
use Trails\Response as TrailsResponse;
trait NegotiatesWithPsr7
{
protected function getPsrRequest(): ServerRequestInterface
{
- return \Slim\Psr7\Factory\ServerRequestFactory::createFromGlobals();
+ return app(ServerRequestInterface::class);
}
protected function getPsrResponse(): ResponseInterface
{
- return new Response();
+ return app(ResponseFactoryInterface::class)->createResponse();
}
protected function convertPsrResponse(ResponseInterface $response): TrailsResponse
diff --git a/tests/_support/Helper/Jsonapi.php b/tests/_support/Helper/Jsonapi.php
index 2dec2d1..cbb2216 100644
--- a/tests/_support/Helper/Jsonapi.php
+++ b/tests/_support/Helper/Jsonapi.php
@@ -5,11 +5,11 @@ namespace Helper;
use DI\ContainerBuilder;
use JsonApi\Errors\JsonApiErrorRenderer;
use JsonApi\Middlewares\Authentication;
+use Nyholm\Psr7\Factory\Psr17Factory;
+use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use Slim\Factory\AppFactory;
use Slim\Interfaces\ErrorHandlerInterface;
-use Slim\Psr7\Factory\ServerRequestFactory;
-use Slim\Psr7\Request;
use WoohooLabs\Yang\JsonApi\Request\JsonApiRequestBuilder;
use WoohooLabs\Yang\JsonApi\Response\JsonApiResponse;
@@ -69,18 +69,13 @@ class Jsonapi extends \Codeception\Module
*/
public function createRequestBuilder($credentials = null)
{
- $serverParams = [];
- if ($credentials) {
- $serverParams = [
- 'PHP_AUTH_USER' => $credentials['username'],
- 'PHP_AUTH_PW' => $credentials['password'],
- ];
- }
- $factory = new ServerRequestFactory();
- $request = $factory->createServerRequest('GET', '', $serverParams);
+ $serverParams = $credentials
+ ? ['PHP_AUTH_USER' => $credentials['username'], 'PHP_AUTH_PW' => $credentials['password']]
+ : [];
+ $psr17Factory = new Psr17Factory();
+ $request = $psr17Factory->createServerRequest('GET', '', $serverParams);
$requestBuilder = new JsonApiRequestBuilder($request);
-
$requestBuilder->setProtocolVersion('1.0')->setHeader('Accept-Charset', 'utf-8');
return $requestBuilder;
@@ -91,12 +86,17 @@ class Jsonapi extends \Codeception\Module
*
* @return JsonApiResponse
*/
- public function sendMockRequest($app, Request $request)
+ public function sendMockRequest($app, RequestInterface $request)
{
/** @var \DI\Container */
$container = $app->getContainer();
$container->set('request', $request);
+ // copy query string to query params
+ $queryParams = [];
+ parse_str($request->getUri()->getQuery(), $queryParams);
+ $request = $request->withQueryParams($queryParams);
+
$response = $app->handle($request);
return new JsonApiResponse($response);
@@ -158,6 +158,8 @@ class Jsonapi extends \Codeception\Module
{
$containerBuilder = new ContainerBuilder();
+ $containerBuilder->addDefinitions('lib/bootstrap-definitions.php');
+
$settings = require 'lib/classes/JsonApi/settings.php';
$settings($containerBuilder);
diff --git a/tests/_support/_generated/FunctionalTesterActions.php b/tests/_support/_generated/FunctionalTesterActions.php
index 1f35fae..b5cf131 100644
--- a/tests/_support/_generated/FunctionalTesterActions.php
+++ b/tests/_support/_generated/FunctionalTesterActions.php
@@ -1,9 +1,9 @@
-<?php //[STAMP] 80b4e0bf1e286a6a3bd71a25c2b1a786
+<?php //[STAMP] c5619ad0c54058717fc7144a9556c23b
+// phpcs:ignoreFile
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
{
diff --git a/tests/_support/_generated/JsonapiTesterActions.php b/tests/_support/_generated/JsonapiTesterActions.php
index c191a3e..9cf6118 100644
--- a/tests/_support/_generated/JsonapiTesterActions.php
+++ b/tests/_support/_generated/JsonapiTesterActions.php
@@ -1,9 +1,9 @@
-<?php //[STAMP] 7e4574f977226c21c1b7dd8a4f07ec4e
+<?php //[STAMP] 9a0bbbffd781acee72848c128782d162
+// phpcs:ignoreFile
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
{
@@ -16,41 +16,6 @@ trait JsonapiTesterActions
/**
* [!] 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.
*
@@ -74,11 +39,10 @@ trait JsonapiTesterActions
* ```
*
* @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()));
+ public function expectThrowable($throwable, callable $callback): void {
+ $this->getScenario()->runStep(new \Codeception\Step\Action('expectThrowable', func_get_args()));
}
@@ -86,12 +50,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertFileNotExists(string $filename, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotExists', func_get_args()));
}
@@ -101,12 +62,11 @@ trait JsonapiTesterActions
*
* Asserts that a value is greater than or equal to another value.
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertGreaterOrEquals()
*/
- public function assertGreaterOrEquals($expected, $actual, $message = "") {
+ public function assertGreaterOrEquals($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterOrEquals', func_get_args()));
}
@@ -116,11 +76,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is empty.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsEmpty()
*/
- public function assertIsEmpty($actual, $message = "") {
+ public function assertIsEmpty($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsEmpty', func_get_args()));
}
@@ -130,12 +89,11 @@ trait JsonapiTesterActions
*
* Asserts that a value is smaller than or equal to another value.
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertLessOrEquals()
*/
- public function assertLessOrEquals($expected, $actual, $message = "") {
+ public function assertLessOrEquals($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessOrEquals', func_get_args()));
}
@@ -144,13 +102,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertNotRegExp(string $pattern, string $string, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotRegExp', func_get_args()));
}
@@ -159,13 +113,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertRegExp(string $pattern, string $string, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertRegExp', func_get_args()));
}
@@ -175,12 +125,10 @@ trait JsonapiTesterActions
*
* Evaluates a PHPUnit\Framework\Constraint matcher object.
*
- * @param $value
- * @param Constraint $constraint
- * @param string $message
+ * @param mixed $value
* @see \Codeception\Module\AbstractAsserts::assertThatItsNot()
*/
- public function assertThatItsNot($value, $constraint, $message = "") {
+ public function assertThatItsNot($value, \PHPUnit\Framework\Constraint\Constraint $constraint, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertThatItsNot', func_get_args()));
}
@@ -191,11 +139,10 @@ trait JsonapiTesterActions
* Asserts that an array has a specified key.
*
* @param int|string $key
- * @param array|ArrayAccess $array
- * @param string $message
+ * @param array|\ArrayAccess $array
* @see \Codeception\Module\AbstractAsserts::assertArrayHasKey()
*/
- public function assertArrayHasKey($key, $array, $message = "") {
+ public function assertArrayHasKey($key, $array, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayHasKey', func_get_args()));
}
@@ -206,11 +153,10 @@ trait JsonapiTesterActions
* Asserts that an array does not have a specified key.
*
* @param int|string $key
- * @param array|ArrayAccess $array
- * @param string $message
+ * @param array|\ArrayAccess $array
* @see \Codeception\Module\AbstractAsserts::assertArrayNotHasKey()
*/
- public function assertArrayNotHasKey($key, $array, $message = "") {
+ public function assertArrayNotHasKey($key, $array, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayNotHasKey', func_get_args()));
}
@@ -219,13 +165,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertClassHasAttribute(string $attributeName, string $className, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassHasAttribute', func_get_args()));
}
@@ -234,13 +176,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertClassHasStaticAttribute(string $attributeName, string $className, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassHasStaticAttribute', func_get_args()));
}
@@ -249,13 +187,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertClassNotHasAttribute(string $attributeName, string $className, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassNotHasAttribute', func_get_args()));
}
@@ -264,13 +198,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertClassNotHasStaticAttribute(string $attributeName, string $className, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassNotHasStaticAttribute', func_get_args()));
}
@@ -280,12 +210,10 @@ trait JsonapiTesterActions
*
* Asserts that a haystack contains a needle.
*
- * @param $needle
- * @param $haystack
- * @param string $message
+ * @param mixed $needle
* @see \Codeception\Module\AbstractAsserts::assertContains()
*/
- public function assertContains($needle, $haystack, $message = "") {
+ public function assertContains($needle, iterable $haystack, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContains', func_get_args()));
}
@@ -293,12 +221,10 @@ trait JsonapiTesterActions
/**
* [!] Method is generated. Documentation taken from corresponding module.
*
- * @param $needle
- * @param $haystack
- * @param string $message
+ * @param mixed $needle
* @see \Codeception\Module\AbstractAsserts::assertContainsEquals()
*/
- public function assertContainsEquals($needle, $haystack, $message = "") {
+ public function assertContainsEquals($needle, iterable $haystack, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsEquals', func_get_args()));
}
@@ -307,14 +233,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = NULL, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnly', func_get_args()));
}
@@ -323,13 +244,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertContainsOnlyInstancesOf(string $className, iterable $haystack, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnlyInstancesOf', func_get_args()));
}
@@ -339,12 +256,10 @@ trait JsonapiTesterActions
*
* Asserts the number of elements of an array, Countable or Traversable.
*
- * @param int $expectedCount
- * @param Countable|iterable $haystack
- * @param string $message
+ * @param \Countable|iterable $haystack
* @see \Codeception\Module\AbstractAsserts::assertCount()
*/
- public function assertCount($expectedCount, $haystack, $message = "") {
+ public function assertCount(int $expectedCount, $haystack, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertCount', func_get_args()));
}
@@ -353,12 +268,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertDirectoryDoesNotExist(string $directory, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryDoesNotExist', func_get_args()));
}
@@ -367,12 +279,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertDirectoryExists(string $directory, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryExists', func_get_args()));
}
@@ -381,12 +290,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertDirectoryIsNotReadable(string $directory, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsNotReadable', func_get_args()));
}
@@ -395,12 +301,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertDirectoryIsNotWritable(string $directory, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsNotWritable', func_get_args()));
}
@@ -409,12 +312,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertDirectoryIsReadable(string $directory, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsReadable', func_get_args()));
}
@@ -423,12 +323,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertDirectoryIsWritable(string $directory, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsWritable', func_get_args()));
}
@@ -437,13 +334,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertDoesNotMatchRegularExpression(string $pattern, string $string, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDoesNotMatchRegularExpression', func_get_args()));
}
@@ -453,11 +346,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is empty.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertEmpty()
*/
- public function assertEmpty($actual, $message = "") {
+ public function assertEmpty($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args()));
}
@@ -467,12 +359,11 @@ trait JsonapiTesterActions
*
* Asserts that two variables are equal.
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertEquals()
*/
- public function assertEquals($expected, $actual, $message = "") {
+ public function assertEquals($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEquals', func_get_args()));
}
@@ -482,12 +373,11 @@ trait JsonapiTesterActions
*
* Asserts that two variables are equal (canonicalizing).
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertEqualsCanonicalizing()
*/
- public function assertEqualsCanonicalizing($expected, $actual, $message = "") {
+ public function assertEqualsCanonicalizing($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsCanonicalizing', func_get_args()));
}
@@ -497,12 +387,11 @@ trait JsonapiTesterActions
*
* Asserts that two variables are equal (ignoring case).
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertEqualsIgnoringCase()
*/
- public function assertEqualsIgnoringCase($expected, $actual, $message = "") {
+ public function assertEqualsIgnoringCase($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsIgnoringCase', func_get_args()));
}
@@ -512,13 +401,11 @@ trait JsonapiTesterActions
*
* Asserts that two variables are equal (with delta).
*
- * @param $expected
- * @param $actual
- * @param float $delta
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertEqualsWithDelta()
*/
- public function assertEqualsWithDelta($expected, $actual, $delta, $message = "") {
+ public function assertEqualsWithDelta($expected, $actual, float $delta, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsWithDelta', func_get_args()));
}
@@ -528,11 +415,10 @@ trait JsonapiTesterActions
*
* Asserts that a condition is false.
*
- * @param $condition
- * @param string $message
+ * @param mixed $condition
* @see \Codeception\Module\AbstractAsserts::assertFalse()
*/
- public function assertFalse($condition, $message = "") {
+ public function assertFalse($condition, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFalse', func_get_args()));
}
@@ -541,12 +427,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertFileDoesNotExist(string $filename, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileDoesNotExist', func_get_args()));
}
@@ -555,13 +438,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertFileEquals(string $expected, string $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEquals', func_get_args()));
}
@@ -570,13 +449,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertFileEqualsCanonicalizing(string $expected, string $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEqualsCanonicalizing', func_get_args()));
}
@@ -585,13 +460,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertFileEqualsIgnoringCase(string $expected, string $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEqualsIgnoringCase', func_get_args()));
}
@@ -600,12 +471,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertFileExists(string $filename, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileExists', func_get_args()));
}
@@ -614,12 +482,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertFileIsNotReadable(string $file, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsNotReadable', func_get_args()));
}
@@ -628,12 +493,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertFileIsNotWritable(string $file, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsNotWritable', func_get_args()));
}
@@ -642,12 +504,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertFileIsReadable(string $file, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsReadable', func_get_args()));
}
@@ -656,12 +515,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertFileIsWritable(string $file, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsWritable', func_get_args()));
}
@@ -670,13 +526,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertFileNotEquals(string $expected, string $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEquals', func_get_args()));
}
@@ -685,13 +537,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertFileNotEqualsCanonicalizing(string $expected, string $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEqualsCanonicalizing', func_get_args()));
}
@@ -700,13 +548,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertFileNotEqualsIgnoringCase(string $expected, string $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEqualsIgnoringCase', func_get_args()));
}
@@ -716,11 +560,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is finite.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertFinite()
*/
- public function assertFinite($actual, $message = "") {
+ public function assertFinite($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFinite', func_get_args()));
}
@@ -730,12 +573,11 @@ trait JsonapiTesterActions
*
* Asserts that a value is greater than another value.
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertGreaterThan()
*/
- public function assertGreaterThan($expected, $actual, $message = "") {
+ public function assertGreaterThan($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args()));
}
@@ -745,12 +587,11 @@ trait JsonapiTesterActions
*
* Asserts that a value is greater than or equal to another value.
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertGreaterThanOrEqual()
*/
- public function assertGreaterThanOrEqual($expected, $actual, $message = "") {
+ public function assertGreaterThanOrEqual($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args()));
}
@@ -760,11 +601,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is infinite.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertInfinite()
*/
- public function assertInfinite($actual, $message = "") {
+ public function assertInfinite($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertInfinite', func_get_args()));
}
@@ -774,12 +614,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is of a given type.
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertInstanceOf()
*/
- public function assertInstanceOf($expected, $actual, $message = "") {
+ public function assertInstanceOf(string $expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertInstanceOf', func_get_args()));
}
@@ -789,11 +627,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is of type array.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsArray()
*/
- public function assertIsArray($actual, $message = "") {
+ public function assertIsArray($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsArray', func_get_args()));
}
@@ -803,11 +640,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is of type bool.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsBool()
*/
- public function assertIsBool($actual, $message = "") {
+ public function assertIsBool($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsBool', func_get_args()));
}
@@ -817,11 +653,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is of type callable.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsCallable()
*/
- public function assertIsCallable($actual, $message = "") {
+ public function assertIsCallable($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsCallable', func_get_args()));
}
@@ -831,11 +666,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is of type resource and is closed.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsClosedResource()
*/
- public function assertIsClosedResource($actual, $message = "") {
+ public function assertIsClosedResource($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsClosedResource', func_get_args()));
}
@@ -845,11 +679,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is of type float.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsFloat()
*/
- public function assertIsFloat($actual, $message = "") {
+ public function assertIsFloat($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsFloat', func_get_args()));
}
@@ -859,11 +692,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is of type int.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsInt()
*/
- public function assertIsInt($actual, $message = "") {
+ public function assertIsInt($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsInt', func_get_args()));
}
@@ -873,11 +705,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is of type iterable.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsIterable()
*/
- public function assertIsIterable($actual, $message = "") {
+ public function assertIsIterable($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsIterable', func_get_args()));
}
@@ -887,11 +718,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is not of type array.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNotArray()
*/
- public function assertIsNotArray($actual, $message = "") {
+ public function assertIsNotArray($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotArray', func_get_args()));
}
@@ -901,11 +731,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is not of type bool.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNotBool()
*/
- public function assertIsNotBool($actual, $message = "") {
+ public function assertIsNotBool($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotBool', func_get_args()));
}
@@ -915,11 +744,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is not of type callable.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNotCallable()
*/
- public function assertIsNotCallable($actual, $message = "") {
+ public function assertIsNotCallable($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotCallable', func_get_args()));
}
@@ -929,11 +757,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is not of type resource.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNotClosedResource()
*/
- public function assertIsNotClosedResource($actual, $message = "") {
+ public function assertIsNotClosedResource($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotClosedResource', func_get_args()));
}
@@ -943,11 +770,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is not of type float.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNotFloat()
*/
- public function assertIsNotFloat($actual, $message = "") {
+ public function assertIsNotFloat($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotFloat', func_get_args()));
}
@@ -957,11 +783,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is not of type int.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNotInt()
*/
- public function assertIsNotInt($actual, $message = "") {
+ public function assertIsNotInt($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotInt', func_get_args()));
}
@@ -971,11 +796,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is not of type iterable.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNotIterable()
*/
- public function assertIsNotIterable($actual, $message = "") {
+ public function assertIsNotIterable($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotIterable', func_get_args()));
}
@@ -985,11 +809,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is not of type numeric.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNotNumeric()
*/
- public function assertIsNotNumeric($actual, $message = "") {
+ public function assertIsNotNumeric($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotNumeric', func_get_args()));
}
@@ -999,11 +822,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is not of type object.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNotObject()
*/
- public function assertIsNotObject($actual, $message = "") {
+ public function assertIsNotObject($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotObject', func_get_args()));
}
@@ -1012,12 +834,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertIsNotReadable(string $filename, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotReadable', func_get_args()));
}
@@ -1027,11 +846,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is not of type resource.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNotResource()
*/
- public function assertIsNotResource($actual, $message = "") {
+ public function assertIsNotResource($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotResource', func_get_args()));
}
@@ -1041,11 +859,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is not of type scalar.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNotScalar()
*/
- public function assertIsNotScalar($actual, $message = "") {
+ public function assertIsNotScalar($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotScalar', func_get_args()));
}
@@ -1055,11 +872,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is not of type string.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNotString()
*/
- public function assertIsNotString($actual, $message = "") {
+ public function assertIsNotString($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotString', func_get_args()));
}
@@ -1068,12 +884,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertIsNotWritable(string $filename, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotWritable', func_get_args()));
}
@@ -1083,11 +896,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is of type numeric.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNumeric()
*/
- public function assertIsNumeric($actual, $message = "") {
+ public function assertIsNumeric($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNumeric', func_get_args()));
}
@@ -1097,11 +909,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is of type object.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsObject()
*/
- public function assertIsObject($actual, $message = "") {
+ public function assertIsObject($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsObject', func_get_args()));
}
@@ -1110,12 +921,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertIsReadable(string $filename, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsReadable', func_get_args()));
}
@@ -1125,11 +933,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is of type resource.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsResource()
*/
- public function assertIsResource($actual, $message = "") {
+ public function assertIsResource($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsResource', func_get_args()));
}
@@ -1139,11 +946,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is of type scalar.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsScalar()
*/
- public function assertIsScalar($actual, $message = "") {
+ public function assertIsScalar($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsScalar', func_get_args()));
}
@@ -1153,11 +959,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is of type string.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsString()
*/
- public function assertIsString($actual, $message = "") {
+ public function assertIsString($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsString', func_get_args()));
}
@@ -1166,12 +971,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertIsWritable(string $filename, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsWritable', func_get_args()));
}
@@ -1180,12 +982,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertJson(string $actualJson, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJson', func_get_args()));
}
@@ -1194,13 +993,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonFileEqualsJsonFile', func_get_args()));
}
@@ -1209,13 +1004,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonFileNotEqualsJsonFile', func_get_args()));
}
@@ -1224,13 +1015,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringEqualsJsonFile', func_get_args()));
}
@@ -1239,13 +1026,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringEqualsJsonString', func_get_args()));
}
@@ -1254,13 +1037,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringNotEqualsJsonFile', func_get_args()));
}
@@ -1269,13 +1048,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertJsonStringNotEqualsJsonString(string $expectedJson, string $actualJson, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringNotEqualsJsonString', func_get_args()));
}
@@ -1285,12 +1060,11 @@ trait JsonapiTesterActions
*
* Asserts that a value is smaller than another value.
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertLessThan()
*/
- public function assertLessThan($expected, $actual, $message = "") {
+ public function assertLessThan($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args()));
}
@@ -1300,12 +1074,11 @@ trait JsonapiTesterActions
*
* Asserts that a value is smaller than or equal to another value.
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertLessThanOrEqual()
*/
- public function assertLessThanOrEqual($expected, $actual, $message = "") {
+ public function assertLessThanOrEqual($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args()));
}
@@ -1314,13 +1087,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertMatchesRegularExpression(string $pattern, string $string, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertMatchesRegularExpression', func_get_args()));
}
@@ -1330,11 +1099,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is nan.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertNan()
*/
- public function assertNan($actual, $message = "") {
+ public function assertNan($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNan', func_get_args()));
}
@@ -1344,12 +1112,10 @@ trait JsonapiTesterActions
*
* Asserts that a haystack does not contain a needle.
*
- * @param $needle
- * @param $haystack
- * @param string $message
+ * @param mixed $needle
* @see \Codeception\Module\AbstractAsserts::assertNotContains()
*/
- public function assertNotContains($needle, $haystack, $message = "") {
+ public function assertNotContains($needle, iterable $haystack, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args()));
}
@@ -1360,7 +1126,7 @@ trait JsonapiTesterActions
*
* @see \Codeception\Module\AbstractAsserts::assertNotContainsEquals()
*/
- public function assertNotContainsEquals($needle, $haystack, $message = "") {
+ public function assertNotContainsEquals($needle, iterable $haystack, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContainsEquals', func_get_args()));
}
@@ -1369,14 +1135,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertNotContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = NULL, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContainsOnly', func_get_args()));
}
@@ -1386,12 +1147,10 @@ trait JsonapiTesterActions
*
* Asserts the number of elements of an array, Countable or Traversable.
*
- * @param int $expectedCount
- * @param Countable|iterable $haystack
- * @param string $message
+ * @param \Countable|iterable $haystack
* @see \Codeception\Module\AbstractAsserts::assertNotCount()
*/
- public function assertNotCount($expectedCount, $haystack, $message = "") {
+ public function assertNotCount(int $expectedCount, $haystack, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotCount', func_get_args()));
}
@@ -1401,11 +1160,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is not empty.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertNotEmpty()
*/
- public function assertNotEmpty($actual, $message = "") {
+ public function assertNotEmpty($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args()));
}
@@ -1415,12 +1173,11 @@ trait JsonapiTesterActions
*
* Asserts that two variables are not equal.
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertNotEquals()
*/
- public function assertNotEquals($expected, $actual, $message = "") {
+ public function assertNotEquals($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args()));
}
@@ -1430,12 +1187,11 @@ trait JsonapiTesterActions
*
* Asserts that two variables are not equal (canonicalizing).
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertNotEqualsCanonicalizing()
*/
- public function assertNotEqualsCanonicalizing($expected, $actual, $message = "") {
+ public function assertNotEqualsCanonicalizing($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsCanonicalizing', func_get_args()));
}
@@ -1445,12 +1201,11 @@ trait JsonapiTesterActions
*
* Asserts that two variables are not equal (ignoring case).
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertNotEqualsIgnoringCase()
*/
- public function assertNotEqualsIgnoringCase($expected, $actual, $message = "") {
+ public function assertNotEqualsIgnoringCase($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsIgnoringCase', func_get_args()));
}
@@ -1460,13 +1215,11 @@ trait JsonapiTesterActions
*
* Asserts that two variables are not equal (with delta).
*
- * @param $expected
- * @param $actual
- * @param float $delta
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertNotEqualsWithDelta()
*/
- public function assertNotEqualsWithDelta($expected, $actual, $delta, $message = "") {
+ public function assertNotEqualsWithDelta($expected, $actual, float $delta, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsWithDelta', func_get_args()));
}
@@ -1476,11 +1229,10 @@ trait JsonapiTesterActions
*
* Asserts that a condition is not false.
*
- * @param $condition
- * @param string $message
+ * @param mixed $condition
* @see \Codeception\Module\AbstractAsserts::assertNotFalse()
*/
- public function assertNotFalse($condition, $message = "") {
+ public function assertNotFalse($condition, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotFalse', func_get_args()));
}
@@ -1490,12 +1242,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is not of a given type.
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertNotInstanceOf()
*/
- public function assertNotInstanceOf($expected, $actual, $message = "") {
+ public function assertNotInstanceOf(string $expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotInstanceOf', func_get_args()));
}
@@ -1505,11 +1255,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is not null.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertNotNull()
*/
- public function assertNotNull($actual, $message = "") {
+ public function assertNotNull($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args()));
}
@@ -1519,12 +1268,11 @@ trait JsonapiTesterActions
*
* Asserts that two variables do not have the same type and value.
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertNotSame()
*/
- public function assertNotSame($expected, $actual, $message = "") {
+ public function assertNotSame($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args()));
}
@@ -1534,12 +1282,11 @@ trait JsonapiTesterActions
*
* 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
+ * @param \Countable|iterable $expected
+ * @param \Countable|iterable $actual
* @see \Codeception\Module\AbstractAsserts::assertNotSameSize()
*/
- public function assertNotSameSize($expected, $actual, $message = "") {
+ public function assertNotSameSize($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSameSize', func_get_args()));
}
@@ -1549,11 +1296,10 @@ trait JsonapiTesterActions
*
* Asserts that a condition is not true.
*
- * @param $condition
- * @param string $message
+ * @param mixed $condition
* @see \Codeception\Module\AbstractAsserts::assertNotTrue()
*/
- public function assertNotTrue($condition, $message = "") {
+ public function assertNotTrue($condition, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotTrue', func_get_args()));
}
@@ -1563,11 +1309,10 @@ trait JsonapiTesterActions
*
* Asserts that a variable is null.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertNull()
*/
- public function assertNull($actual, $message = "") {
+ public function assertNull($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNull', func_get_args()));
}
@@ -1576,13 +1321,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertObjectHasAttribute(string $attributeName, object $object, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertObjectHasAttribute', func_get_args()));
}
@@ -1591,13 +1332,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertObjectNotHasAttribute(string $attributeName, object $object, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertObjectNotHasAttribute', func_get_args()));
}
@@ -1607,12 +1344,11 @@ trait JsonapiTesterActions
*
* Asserts that two variables have the same type and value.
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertSame()
*/
- public function assertSame($expected, $actual, $message = "") {
+ public function assertSame($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSame', func_get_args()));
}
@@ -1622,12 +1358,11 @@ trait JsonapiTesterActions
*
* 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
+ * @param \Countable|iterable $expected
+ * @param \Countable|iterable $actual
* @see \Codeception\Module\AbstractAsserts::assertSameSize()
*/
- public function assertSameSize($expected, $actual, $message = "") {
+ public function assertSameSize($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSameSize', func_get_args()));
}
@@ -1635,12 +1370,10 @@ trait JsonapiTesterActions
/**
* [!] 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 = "") {
+ public function assertStringContainsString(string $needle, string $haystack, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringContainsString', func_get_args()));
}
@@ -1651,7 +1384,7 @@ trait JsonapiTesterActions
*
* @see \Codeception\Module\AbstractAsserts::assertStringContainsStringIgnoringCase()
*/
- public function assertStringContainsStringIgnoringCase($needle, $haystack, $message = "") {
+ public function assertStringContainsStringIgnoringCase(string $needle, string $haystack, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringContainsStringIgnoringCase', func_get_args()));
}
@@ -1660,13 +1393,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertStringEndsNotWith(string $suffix, string $string, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEndsNotWith', func_get_args()));
}
@@ -1675,13 +1404,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertStringEndsWith(string $suffix, string $string, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEndsWith', func_get_args()));
}
@@ -1690,13 +1415,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertStringEqualsFile(string $expectedFile, string $actualString, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFile', func_get_args()));
}
@@ -1705,13 +1426,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertStringEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFileCanonicalizing', func_get_args()));
}
@@ -1720,13 +1437,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertStringEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFileIgnoringCase', func_get_args()));
}
@@ -1735,13 +1448,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertStringMatchesFormat(string $format, string $string, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringMatchesFormat', func_get_args()));
}
@@ -1750,13 +1459,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertStringMatchesFormatFile(string $formatFile, string $string, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringMatchesFormatFile', func_get_args()));
}
@@ -1764,12 +1469,10 @@ trait JsonapiTesterActions
/**
* [!] 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 = "") {
+ public function assertStringNotContainsString(string $needle, string $haystack, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotContainsString', func_get_args()));
}
@@ -1777,12 +1480,10 @@ trait JsonapiTesterActions
/**
* [!] 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 = "") {
+ public function assertStringNotContainsStringIgnoringCase(string $needle, string $haystack, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotContainsStringIgnoringCase', func_get_args()));
}
@@ -1791,13 +1492,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertStringNotEqualsFile(string $expectedFile, string $actualString, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFile', func_get_args()));
}
@@ -1806,12 +1503,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertStringNotEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFileCanonicalizing', func_get_args()));
}
@@ -1820,13 +1514,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertStringNotEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFileIgnoringCase', func_get_args()));
}
@@ -1835,13 +1525,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertStringNotMatchesFormat(string $format, string $string, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotMatchesFormat', func_get_args()));
}
@@ -1850,13 +1536,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertStringNotMatchesFormatFile(string $formatFile, string $string, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotMatchesFormatFile', func_get_args()));
}
@@ -1865,13 +1547,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertStringStartsNotWith(string $prefix, string $string, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringStartsNotWith', func_get_args()));
}
@@ -1880,13 +1558,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertStringStartsWith(string $prefix, string $string, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringStartsWith', func_get_args()));
}
@@ -1896,12 +1570,10 @@ trait JsonapiTesterActions
*
* Evaluates a PHPUnit\Framework\Constraint matcher object.
*
- * @param $value
- * @param Constraint $constraint
- * @param string $message
+ * @param mixed $value
* @see \Codeception\Module\AbstractAsserts::assertThat()
*/
- public function assertThat($value, $constraint, $message = "") {
+ public function assertThat($value, \PHPUnit\Framework\Constraint\Constraint $constraint, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertThat', func_get_args()));
}
@@ -1911,11 +1583,10 @@ trait JsonapiTesterActions
*
* Asserts that a condition is true.
*
- * @param $condition
- * @param string $message
+ * @param mixed $condition
* @see \Codeception\Module\AbstractAsserts::assertTrue()
*/
- public function assertTrue($condition, $message = "") {
+ public function assertTrue($condition, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertTrue', func_get_args()));
}
@@ -1924,13 +1595,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlFileEqualsXmlFile', func_get_args()));
}
@@ -1939,13 +1606,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function assertXmlFileNotEqualsXmlFile(string $expectedFile, string $actualFile, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlFileNotEqualsXmlFile', func_get_args()));
}
@@ -1955,12 +1618,10 @@ trait JsonapiTesterActions
*
* Asserts that two XML documents are equal.
*
- * @param string $expectedFile
- * @param DOMDocument|string $actualXml
- * @param string $message
+ * @param \DOMDocument|string $actualXml
* @see \Codeception\Module\AbstractAsserts::assertXmlStringEqualsXmlFile()
*/
- public function assertXmlStringEqualsXmlFile($expectedFile, $actualXml, $message = "") {
+ public function assertXmlStringEqualsXmlFile(string $expectedFile, $actualXml, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringEqualsXmlFile', func_get_args()));
}
@@ -1970,12 +1631,11 @@ trait JsonapiTesterActions
*
* Asserts that two XML documents are equal.
*
- * @param DOMDocument|string $expectedXml
- * @param DOMDocument|string $actualXml
- * @param string $message
+ * @param \DOMDocument|string $expectedXml
+ * @param \DOMDocument|string $actualXml
* @see \Codeception\Module\AbstractAsserts::assertXmlStringEqualsXmlString()
*/
- public function assertXmlStringEqualsXmlString($expectedXml, $actualXml, $message = "") {
+ public function assertXmlStringEqualsXmlString($expectedXml, $actualXml, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringEqualsXmlString', func_get_args()));
}
@@ -1985,12 +1645,10 @@ trait JsonapiTesterActions
*
* Asserts that two XML documents are not equal.
*
- * @param string $expectedFile
- * @param DOMDocument|string $actualXml
- * @param string $message
+ * @param \DOMDocument|string $actualXml
* @see \Codeception\Module\AbstractAsserts::assertXmlStringNotEqualsXmlFile()
*/
- public function assertXmlStringNotEqualsXmlFile($expectedFile, $actualXml, $message = "") {
+ public function assertXmlStringNotEqualsXmlFile(string $expectedFile, $actualXml, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringNotEqualsXmlFile', func_get_args()));
}
@@ -2000,12 +1658,11 @@ trait JsonapiTesterActions
*
* Asserts that two XML documents are not equal.
*
- * @param DOMDocument|string $expectedXml
- * @param DOMDocument|string $actualXml
- * @param string $message
+ * @param \DOMDocument|string $expectedXml
+ * @param \DOMDocument|string $actualXml
* @see \Codeception\Module\AbstractAsserts::assertXmlStringNotEqualsXmlString()
*/
- public function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, $message = "") {
+ public function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringNotEqualsXmlString', func_get_args()));
}
@@ -2014,11 +1671,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function fail(string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('fail', func_get_args()));
}
@@ -2027,11 +1682,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function markTestIncomplete(string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('markTestIncomplete', func_get_args()));
}
@@ -2040,11 +1693,9 @@ trait JsonapiTesterActions
* [!] 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 = "") {
+ public function markTestSkipped(string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('markTestSkipped', func_get_args()));
}
@@ -2147,7 +1798,7 @@ trait JsonapiTesterActions
* @return JsonApiResponse
* @see \Helper\Jsonapi::sendMockRequest()
*/
- public function sendMockRequest($app, \Slim\Psr7\Request $request) {
+ public function sendMockRequest($app, \Psr\Http\Message\RequestInterface $request) {
return $this->getScenario()->runStep(new \Codeception\Step\Action('sendMockRequest', func_get_args()));
}
diff --git a/tests/_support/_generated/UnitTesterActions.php b/tests/_support/_generated/UnitTesterActions.php
index c07f08d..c6ecb12 100644
--- a/tests/_support/_generated/UnitTesterActions.php
+++ b/tests/_support/_generated/UnitTesterActions.php
@@ -1,9 +1,9 @@
-<?php //[STAMP] 0c514e6a0684bf12cca1e1c5550cee92
+<?php //[STAMP] 3095e7850c50a08f8ec4574b11de1ab8
+// phpcs:ignoreFile
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
{
@@ -16,41 +16,6 @@ trait UnitTesterActions
/**
* [!] 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.
*
@@ -74,11 +39,10 @@ trait UnitTesterActions
* ```
*
* @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()));
+ public function expectThrowable($throwable, callable $callback): void {
+ $this->getScenario()->runStep(new \Codeception\Step\Action('expectThrowable', func_get_args()));
}
@@ -86,12 +50,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertFileNotExists(string $filename, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotExists', func_get_args()));
}
@@ -101,12 +62,11 @@ trait UnitTesterActions
*
* Asserts that a value is greater than or equal to another value.
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertGreaterOrEquals()
*/
- public function assertGreaterOrEquals($expected, $actual, $message = "") {
+ public function assertGreaterOrEquals($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterOrEquals', func_get_args()));
}
@@ -116,11 +76,10 @@ trait UnitTesterActions
*
* Asserts that a variable is empty.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsEmpty()
*/
- public function assertIsEmpty($actual, $message = "") {
+ public function assertIsEmpty($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsEmpty', func_get_args()));
}
@@ -130,12 +89,11 @@ trait UnitTesterActions
*
* Asserts that a value is smaller than or equal to another value.
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertLessOrEquals()
*/
- public function assertLessOrEquals($expected, $actual, $message = "") {
+ public function assertLessOrEquals($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessOrEquals', func_get_args()));
}
@@ -144,13 +102,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertNotRegExp(string $pattern, string $string, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotRegExp', func_get_args()));
}
@@ -159,13 +113,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertRegExp(string $pattern, string $string, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertRegExp', func_get_args()));
}
@@ -175,12 +125,10 @@ trait UnitTesterActions
*
* Evaluates a PHPUnit\Framework\Constraint matcher object.
*
- * @param $value
- * @param Constraint $constraint
- * @param string $message
+ * @param mixed $value
* @see \Codeception\Module\AbstractAsserts::assertThatItsNot()
*/
- public function assertThatItsNot($value, $constraint, $message = "") {
+ public function assertThatItsNot($value, \PHPUnit\Framework\Constraint\Constraint $constraint, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertThatItsNot', func_get_args()));
}
@@ -191,11 +139,10 @@ trait UnitTesterActions
* Asserts that an array has a specified key.
*
* @param int|string $key
- * @param array|ArrayAccess $array
- * @param string $message
+ * @param array|\ArrayAccess $array
* @see \Codeception\Module\AbstractAsserts::assertArrayHasKey()
*/
- public function assertArrayHasKey($key, $array, $message = "") {
+ public function assertArrayHasKey($key, $array, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayHasKey', func_get_args()));
}
@@ -206,11 +153,10 @@ trait UnitTesterActions
* Asserts that an array does not have a specified key.
*
* @param int|string $key
- * @param array|ArrayAccess $array
- * @param string $message
+ * @param array|\ArrayAccess $array
* @see \Codeception\Module\AbstractAsserts::assertArrayNotHasKey()
*/
- public function assertArrayNotHasKey($key, $array, $message = "") {
+ public function assertArrayNotHasKey($key, $array, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayNotHasKey', func_get_args()));
}
@@ -219,13 +165,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertClassHasAttribute(string $attributeName, string $className, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassHasAttribute', func_get_args()));
}
@@ -234,13 +176,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertClassHasStaticAttribute(string $attributeName, string $className, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassHasStaticAttribute', func_get_args()));
}
@@ -249,13 +187,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertClassNotHasAttribute(string $attributeName, string $className, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassNotHasAttribute', func_get_args()));
}
@@ -264,13 +198,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertClassNotHasStaticAttribute(string $attributeName, string $className, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassNotHasStaticAttribute', func_get_args()));
}
@@ -280,12 +210,10 @@ trait UnitTesterActions
*
* Asserts that a haystack contains a needle.
*
- * @param $needle
- * @param $haystack
- * @param string $message
+ * @param mixed $needle
* @see \Codeception\Module\AbstractAsserts::assertContains()
*/
- public function assertContains($needle, $haystack, $message = "") {
+ public function assertContains($needle, iterable $haystack, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContains', func_get_args()));
}
@@ -293,12 +221,10 @@ trait UnitTesterActions
/**
* [!] Method is generated. Documentation taken from corresponding module.
*
- * @param $needle
- * @param $haystack
- * @param string $message
+ * @param mixed $needle
* @see \Codeception\Module\AbstractAsserts::assertContainsEquals()
*/
- public function assertContainsEquals($needle, $haystack, $message = "") {
+ public function assertContainsEquals($needle, iterable $haystack, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsEquals', func_get_args()));
}
@@ -307,14 +233,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = NULL, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnly', func_get_args()));
}
@@ -323,13 +244,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertContainsOnlyInstancesOf(string $className, iterable $haystack, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnlyInstancesOf', func_get_args()));
}
@@ -339,12 +256,10 @@ trait UnitTesterActions
*
* Asserts the number of elements of an array, Countable or Traversable.
*
- * @param int $expectedCount
- * @param Countable|iterable $haystack
- * @param string $message
+ * @param \Countable|iterable $haystack
* @see \Codeception\Module\AbstractAsserts::assertCount()
*/
- public function assertCount($expectedCount, $haystack, $message = "") {
+ public function assertCount(int $expectedCount, $haystack, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertCount', func_get_args()));
}
@@ -353,12 +268,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertDirectoryDoesNotExist(string $directory, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryDoesNotExist', func_get_args()));
}
@@ -367,12 +279,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertDirectoryExists(string $directory, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryExists', func_get_args()));
}
@@ -381,12 +290,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertDirectoryIsNotReadable(string $directory, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsNotReadable', func_get_args()));
}
@@ -395,12 +301,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertDirectoryIsNotWritable(string $directory, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsNotWritable', func_get_args()));
}
@@ -409,12 +312,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertDirectoryIsReadable(string $directory, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsReadable', func_get_args()));
}
@@ -423,12 +323,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertDirectoryIsWritable(string $directory, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsWritable', func_get_args()));
}
@@ -437,13 +334,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertDoesNotMatchRegularExpression(string $pattern, string $string, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDoesNotMatchRegularExpression', func_get_args()));
}
@@ -453,11 +346,10 @@ trait UnitTesterActions
*
* Asserts that a variable is empty.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertEmpty()
*/
- public function assertEmpty($actual, $message = "") {
+ public function assertEmpty($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args()));
}
@@ -467,12 +359,11 @@ trait UnitTesterActions
*
* Asserts that two variables are equal.
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertEquals()
*/
- public function assertEquals($expected, $actual, $message = "") {
+ public function assertEquals($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEquals', func_get_args()));
}
@@ -482,12 +373,11 @@ trait UnitTesterActions
*
* Asserts that two variables are equal (canonicalizing).
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertEqualsCanonicalizing()
*/
- public function assertEqualsCanonicalizing($expected, $actual, $message = "") {
+ public function assertEqualsCanonicalizing($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsCanonicalizing', func_get_args()));
}
@@ -497,12 +387,11 @@ trait UnitTesterActions
*
* Asserts that two variables are equal (ignoring case).
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertEqualsIgnoringCase()
*/
- public function assertEqualsIgnoringCase($expected, $actual, $message = "") {
+ public function assertEqualsIgnoringCase($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsIgnoringCase', func_get_args()));
}
@@ -512,13 +401,11 @@ trait UnitTesterActions
*
* Asserts that two variables are equal (with delta).
*
- * @param $expected
- * @param $actual
- * @param float $delta
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertEqualsWithDelta()
*/
- public function assertEqualsWithDelta($expected, $actual, $delta, $message = "") {
+ public function assertEqualsWithDelta($expected, $actual, float $delta, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsWithDelta', func_get_args()));
}
@@ -528,11 +415,10 @@ trait UnitTesterActions
*
* Asserts that a condition is false.
*
- * @param $condition
- * @param string $message
+ * @param mixed $condition
* @see \Codeception\Module\AbstractAsserts::assertFalse()
*/
- public function assertFalse($condition, $message = "") {
+ public function assertFalse($condition, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFalse', func_get_args()));
}
@@ -541,12 +427,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertFileDoesNotExist(string $filename, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileDoesNotExist', func_get_args()));
}
@@ -555,13 +438,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertFileEquals(string $expected, string $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEquals', func_get_args()));
}
@@ -570,13 +449,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertFileEqualsCanonicalizing(string $expected, string $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEqualsCanonicalizing', func_get_args()));
}
@@ -585,13 +460,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertFileEqualsIgnoringCase(string $expected, string $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEqualsIgnoringCase', func_get_args()));
}
@@ -600,12 +471,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertFileExists(string $filename, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileExists', func_get_args()));
}
@@ -614,12 +482,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertFileIsNotReadable(string $file, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsNotReadable', func_get_args()));
}
@@ -628,12 +493,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertFileIsNotWritable(string $file, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsNotWritable', func_get_args()));
}
@@ -642,12 +504,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertFileIsReadable(string $file, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsReadable', func_get_args()));
}
@@ -656,12 +515,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertFileIsWritable(string $file, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsWritable', func_get_args()));
}
@@ -670,13 +526,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertFileNotEquals(string $expected, string $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEquals', func_get_args()));
}
@@ -685,13 +537,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertFileNotEqualsCanonicalizing(string $expected, string $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEqualsCanonicalizing', func_get_args()));
}
@@ -700,13 +548,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertFileNotEqualsIgnoringCase(string $expected, string $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEqualsIgnoringCase', func_get_args()));
}
@@ -716,11 +560,10 @@ trait UnitTesterActions
*
* Asserts that a variable is finite.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertFinite()
*/
- public function assertFinite($actual, $message = "") {
+ public function assertFinite($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFinite', func_get_args()));
}
@@ -730,12 +573,11 @@ trait UnitTesterActions
*
* Asserts that a value is greater than another value.
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertGreaterThan()
*/
- public function assertGreaterThan($expected, $actual, $message = "") {
+ public function assertGreaterThan($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args()));
}
@@ -745,12 +587,11 @@ trait UnitTesterActions
*
* Asserts that a value is greater than or equal to another value.
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertGreaterThanOrEqual()
*/
- public function assertGreaterThanOrEqual($expected, $actual, $message = "") {
+ public function assertGreaterThanOrEqual($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args()));
}
@@ -760,11 +601,10 @@ trait UnitTesterActions
*
* Asserts that a variable is infinite.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertInfinite()
*/
- public function assertInfinite($actual, $message = "") {
+ public function assertInfinite($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertInfinite', func_get_args()));
}
@@ -774,12 +614,10 @@ trait UnitTesterActions
*
* Asserts that a variable is of a given type.
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertInstanceOf()
*/
- public function assertInstanceOf($expected, $actual, $message = "") {
+ public function assertInstanceOf(string $expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertInstanceOf', func_get_args()));
}
@@ -789,11 +627,10 @@ trait UnitTesterActions
*
* Asserts that a variable is of type array.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsArray()
*/
- public function assertIsArray($actual, $message = "") {
+ public function assertIsArray($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsArray', func_get_args()));
}
@@ -803,11 +640,10 @@ trait UnitTesterActions
*
* Asserts that a variable is of type bool.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsBool()
*/
- public function assertIsBool($actual, $message = "") {
+ public function assertIsBool($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsBool', func_get_args()));
}
@@ -817,11 +653,10 @@ trait UnitTesterActions
*
* Asserts that a variable is of type callable.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsCallable()
*/
- public function assertIsCallable($actual, $message = "") {
+ public function assertIsCallable($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsCallable', func_get_args()));
}
@@ -831,11 +666,10 @@ trait UnitTesterActions
*
* Asserts that a variable is of type resource and is closed.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsClosedResource()
*/
- public function assertIsClosedResource($actual, $message = "") {
+ public function assertIsClosedResource($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsClosedResource', func_get_args()));
}
@@ -845,11 +679,10 @@ trait UnitTesterActions
*
* Asserts that a variable is of type float.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsFloat()
*/
- public function assertIsFloat($actual, $message = "") {
+ public function assertIsFloat($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsFloat', func_get_args()));
}
@@ -859,11 +692,10 @@ trait UnitTesterActions
*
* Asserts that a variable is of type int.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsInt()
*/
- public function assertIsInt($actual, $message = "") {
+ public function assertIsInt($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsInt', func_get_args()));
}
@@ -873,11 +705,10 @@ trait UnitTesterActions
*
* Asserts that a variable is of type iterable.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsIterable()
*/
- public function assertIsIterable($actual, $message = "") {
+ public function assertIsIterable($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsIterable', func_get_args()));
}
@@ -887,11 +718,10 @@ trait UnitTesterActions
*
* Asserts that a variable is not of type array.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNotArray()
*/
- public function assertIsNotArray($actual, $message = "") {
+ public function assertIsNotArray($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotArray', func_get_args()));
}
@@ -901,11 +731,10 @@ trait UnitTesterActions
*
* Asserts that a variable is not of type bool.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNotBool()
*/
- public function assertIsNotBool($actual, $message = "") {
+ public function assertIsNotBool($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotBool', func_get_args()));
}
@@ -915,11 +744,10 @@ trait UnitTesterActions
*
* Asserts that a variable is not of type callable.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNotCallable()
*/
- public function assertIsNotCallable($actual, $message = "") {
+ public function assertIsNotCallable($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotCallable', func_get_args()));
}
@@ -929,11 +757,10 @@ trait UnitTesterActions
*
* Asserts that a variable is not of type resource.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNotClosedResource()
*/
- public function assertIsNotClosedResource($actual, $message = "") {
+ public function assertIsNotClosedResource($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotClosedResource', func_get_args()));
}
@@ -943,11 +770,10 @@ trait UnitTesterActions
*
* Asserts that a variable is not of type float.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNotFloat()
*/
- public function assertIsNotFloat($actual, $message = "") {
+ public function assertIsNotFloat($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotFloat', func_get_args()));
}
@@ -957,11 +783,10 @@ trait UnitTesterActions
*
* Asserts that a variable is not of type int.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNotInt()
*/
- public function assertIsNotInt($actual, $message = "") {
+ public function assertIsNotInt($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotInt', func_get_args()));
}
@@ -971,11 +796,10 @@ trait UnitTesterActions
*
* Asserts that a variable is not of type iterable.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNotIterable()
*/
- public function assertIsNotIterable($actual, $message = "") {
+ public function assertIsNotIterable($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotIterable', func_get_args()));
}
@@ -985,11 +809,10 @@ trait UnitTesterActions
*
* Asserts that a variable is not of type numeric.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNotNumeric()
*/
- public function assertIsNotNumeric($actual, $message = "") {
+ public function assertIsNotNumeric($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotNumeric', func_get_args()));
}
@@ -999,11 +822,10 @@ trait UnitTesterActions
*
* Asserts that a variable is not of type object.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNotObject()
*/
- public function assertIsNotObject($actual, $message = "") {
+ public function assertIsNotObject($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotObject', func_get_args()));
}
@@ -1012,12 +834,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertIsNotReadable(string $filename, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotReadable', func_get_args()));
}
@@ -1027,11 +846,10 @@ trait UnitTesterActions
*
* Asserts that a variable is not of type resource.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNotResource()
*/
- public function assertIsNotResource($actual, $message = "") {
+ public function assertIsNotResource($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotResource', func_get_args()));
}
@@ -1041,11 +859,10 @@ trait UnitTesterActions
*
* Asserts that a variable is not of type scalar.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNotScalar()
*/
- public function assertIsNotScalar($actual, $message = "") {
+ public function assertIsNotScalar($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotScalar', func_get_args()));
}
@@ -1055,11 +872,10 @@ trait UnitTesterActions
*
* Asserts that a variable is not of type string.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNotString()
*/
- public function assertIsNotString($actual, $message = "") {
+ public function assertIsNotString($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotString', func_get_args()));
}
@@ -1068,12 +884,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertIsNotWritable(string $filename, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotWritable', func_get_args()));
}
@@ -1083,11 +896,10 @@ trait UnitTesterActions
*
* Asserts that a variable is of type numeric.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsNumeric()
*/
- public function assertIsNumeric($actual, $message = "") {
+ public function assertIsNumeric($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNumeric', func_get_args()));
}
@@ -1097,11 +909,10 @@ trait UnitTesterActions
*
* Asserts that a variable is of type object.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsObject()
*/
- public function assertIsObject($actual, $message = "") {
+ public function assertIsObject($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsObject', func_get_args()));
}
@@ -1110,12 +921,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertIsReadable(string $filename, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsReadable', func_get_args()));
}
@@ -1125,11 +933,10 @@ trait UnitTesterActions
*
* Asserts that a variable is of type resource.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsResource()
*/
- public function assertIsResource($actual, $message = "") {
+ public function assertIsResource($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsResource', func_get_args()));
}
@@ -1139,11 +946,10 @@ trait UnitTesterActions
*
* Asserts that a variable is of type scalar.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsScalar()
*/
- public function assertIsScalar($actual, $message = "") {
+ public function assertIsScalar($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsScalar', func_get_args()));
}
@@ -1153,11 +959,10 @@ trait UnitTesterActions
*
* Asserts that a variable is of type string.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertIsString()
*/
- public function assertIsString($actual, $message = "") {
+ public function assertIsString($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsString', func_get_args()));
}
@@ -1166,12 +971,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertIsWritable(string $filename, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsWritable', func_get_args()));
}
@@ -1180,12 +982,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertJson(string $actualJson, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJson', func_get_args()));
}
@@ -1194,13 +993,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonFileEqualsJsonFile', func_get_args()));
}
@@ -1209,13 +1004,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonFileNotEqualsJsonFile', func_get_args()));
}
@@ -1224,13 +1015,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringEqualsJsonFile', func_get_args()));
}
@@ -1239,13 +1026,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringEqualsJsonString', func_get_args()));
}
@@ -1254,13 +1037,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringNotEqualsJsonFile', func_get_args()));
}
@@ -1269,13 +1048,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertJsonStringNotEqualsJsonString(string $expectedJson, string $actualJson, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringNotEqualsJsonString', func_get_args()));
}
@@ -1285,12 +1060,11 @@ trait UnitTesterActions
*
* Asserts that a value is smaller than another value.
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertLessThan()
*/
- public function assertLessThan($expected, $actual, $message = "") {
+ public function assertLessThan($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args()));
}
@@ -1300,12 +1074,11 @@ trait UnitTesterActions
*
* Asserts that a value is smaller than or equal to another value.
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertLessThanOrEqual()
*/
- public function assertLessThanOrEqual($expected, $actual, $message = "") {
+ public function assertLessThanOrEqual($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args()));
}
@@ -1314,13 +1087,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertMatchesRegularExpression(string $pattern, string $string, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertMatchesRegularExpression', func_get_args()));
}
@@ -1330,11 +1099,10 @@ trait UnitTesterActions
*
* Asserts that a variable is nan.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertNan()
*/
- public function assertNan($actual, $message = "") {
+ public function assertNan($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNan', func_get_args()));
}
@@ -1344,12 +1112,10 @@ trait UnitTesterActions
*
* Asserts that a haystack does not contain a needle.
*
- * @param $needle
- * @param $haystack
- * @param string $message
+ * @param mixed $needle
* @see \Codeception\Module\AbstractAsserts::assertNotContains()
*/
- public function assertNotContains($needle, $haystack, $message = "") {
+ public function assertNotContains($needle, iterable $haystack, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args()));
}
@@ -1360,7 +1126,7 @@ trait UnitTesterActions
*
* @see \Codeception\Module\AbstractAsserts::assertNotContainsEquals()
*/
- public function assertNotContainsEquals($needle, $haystack, $message = "") {
+ public function assertNotContainsEquals($needle, iterable $haystack, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContainsEquals', func_get_args()));
}
@@ -1369,14 +1135,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertNotContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = NULL, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContainsOnly', func_get_args()));
}
@@ -1386,12 +1147,10 @@ trait UnitTesterActions
*
* Asserts the number of elements of an array, Countable or Traversable.
*
- * @param int $expectedCount
- * @param Countable|iterable $haystack
- * @param string $message
+ * @param \Countable|iterable $haystack
* @see \Codeception\Module\AbstractAsserts::assertNotCount()
*/
- public function assertNotCount($expectedCount, $haystack, $message = "") {
+ public function assertNotCount(int $expectedCount, $haystack, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotCount', func_get_args()));
}
@@ -1401,11 +1160,10 @@ trait UnitTesterActions
*
* Asserts that a variable is not empty.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertNotEmpty()
*/
- public function assertNotEmpty($actual, $message = "") {
+ public function assertNotEmpty($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args()));
}
@@ -1415,12 +1173,11 @@ trait UnitTesterActions
*
* Asserts that two variables are not equal.
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertNotEquals()
*/
- public function assertNotEquals($expected, $actual, $message = "") {
+ public function assertNotEquals($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args()));
}
@@ -1430,12 +1187,11 @@ trait UnitTesterActions
*
* Asserts that two variables are not equal (canonicalizing).
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertNotEqualsCanonicalizing()
*/
- public function assertNotEqualsCanonicalizing($expected, $actual, $message = "") {
+ public function assertNotEqualsCanonicalizing($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsCanonicalizing', func_get_args()));
}
@@ -1445,12 +1201,11 @@ trait UnitTesterActions
*
* Asserts that two variables are not equal (ignoring case).
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertNotEqualsIgnoringCase()
*/
- public function assertNotEqualsIgnoringCase($expected, $actual, $message = "") {
+ public function assertNotEqualsIgnoringCase($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsIgnoringCase', func_get_args()));
}
@@ -1460,13 +1215,11 @@ trait UnitTesterActions
*
* Asserts that two variables are not equal (with delta).
*
- * @param $expected
- * @param $actual
- * @param float $delta
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertNotEqualsWithDelta()
*/
- public function assertNotEqualsWithDelta($expected, $actual, $delta, $message = "") {
+ public function assertNotEqualsWithDelta($expected, $actual, float $delta, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsWithDelta', func_get_args()));
}
@@ -1476,11 +1229,10 @@ trait UnitTesterActions
*
* Asserts that a condition is not false.
*
- * @param $condition
- * @param string $message
+ * @param mixed $condition
* @see \Codeception\Module\AbstractAsserts::assertNotFalse()
*/
- public function assertNotFalse($condition, $message = "") {
+ public function assertNotFalse($condition, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotFalse', func_get_args()));
}
@@ -1490,12 +1242,10 @@ trait UnitTesterActions
*
* Asserts that a variable is not of a given type.
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertNotInstanceOf()
*/
- public function assertNotInstanceOf($expected, $actual, $message = "") {
+ public function assertNotInstanceOf(string $expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotInstanceOf', func_get_args()));
}
@@ -1505,11 +1255,10 @@ trait UnitTesterActions
*
* Asserts that a variable is not null.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertNotNull()
*/
- public function assertNotNull($actual, $message = "") {
+ public function assertNotNull($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args()));
}
@@ -1519,12 +1268,11 @@ trait UnitTesterActions
*
* Asserts that two variables do not have the same type and value.
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertNotSame()
*/
- public function assertNotSame($expected, $actual, $message = "") {
+ public function assertNotSame($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args()));
}
@@ -1534,12 +1282,11 @@ trait UnitTesterActions
*
* 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
+ * @param \Countable|iterable $expected
+ * @param \Countable|iterable $actual
* @see \Codeception\Module\AbstractAsserts::assertNotSameSize()
*/
- public function assertNotSameSize($expected, $actual, $message = "") {
+ public function assertNotSameSize($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSameSize', func_get_args()));
}
@@ -1549,11 +1296,10 @@ trait UnitTesterActions
*
* Asserts that a condition is not true.
*
- * @param $condition
- * @param string $message
+ * @param mixed $condition
* @see \Codeception\Module\AbstractAsserts::assertNotTrue()
*/
- public function assertNotTrue($condition, $message = "") {
+ public function assertNotTrue($condition, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotTrue', func_get_args()));
}
@@ -1563,11 +1309,10 @@ trait UnitTesterActions
*
* Asserts that a variable is null.
*
- * @param $actual
- * @param string $message
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertNull()
*/
- public function assertNull($actual, $message = "") {
+ public function assertNull($actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNull', func_get_args()));
}
@@ -1576,13 +1321,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertObjectHasAttribute(string $attributeName, object $object, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertObjectHasAttribute', func_get_args()));
}
@@ -1591,13 +1332,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertObjectNotHasAttribute(string $attributeName, object $object, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertObjectNotHasAttribute', func_get_args()));
}
@@ -1607,12 +1344,11 @@ trait UnitTesterActions
*
* Asserts that two variables have the same type and value.
*
- * @param $expected
- * @param $actual
- * @param string $message
+ * @param mixed $expected
+ * @param mixed $actual
* @see \Codeception\Module\AbstractAsserts::assertSame()
*/
- public function assertSame($expected, $actual, $message = "") {
+ public function assertSame($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSame', func_get_args()));
}
@@ -1622,12 +1358,11 @@ trait UnitTesterActions
*
* 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
+ * @param \Countable|iterable $expected
+ * @param \Countable|iterable $actual
* @see \Codeception\Module\AbstractAsserts::assertSameSize()
*/
- public function assertSameSize($expected, $actual, $message = "") {
+ public function assertSameSize($expected, $actual, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSameSize', func_get_args()));
}
@@ -1635,12 +1370,10 @@ trait UnitTesterActions
/**
* [!] 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 = "") {
+ public function assertStringContainsString(string $needle, string $haystack, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringContainsString', func_get_args()));
}
@@ -1651,7 +1384,7 @@ trait UnitTesterActions
*
* @see \Codeception\Module\AbstractAsserts::assertStringContainsStringIgnoringCase()
*/
- public function assertStringContainsStringIgnoringCase($needle, $haystack, $message = "") {
+ public function assertStringContainsStringIgnoringCase(string $needle, string $haystack, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringContainsStringIgnoringCase', func_get_args()));
}
@@ -1660,13 +1393,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertStringEndsNotWith(string $suffix, string $string, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEndsNotWith', func_get_args()));
}
@@ -1675,13 +1404,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertStringEndsWith(string $suffix, string $string, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEndsWith', func_get_args()));
}
@@ -1690,13 +1415,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertStringEqualsFile(string $expectedFile, string $actualString, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFile', func_get_args()));
}
@@ -1705,13 +1426,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertStringEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFileCanonicalizing', func_get_args()));
}
@@ -1720,13 +1437,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertStringEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFileIgnoringCase', func_get_args()));
}
@@ -1735,13 +1448,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertStringMatchesFormat(string $format, string $string, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringMatchesFormat', func_get_args()));
}
@@ -1750,13 +1459,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertStringMatchesFormatFile(string $formatFile, string $string, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringMatchesFormatFile', func_get_args()));
}
@@ -1764,12 +1469,10 @@ trait UnitTesterActions
/**
* [!] 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 = "") {
+ public function assertStringNotContainsString(string $needle, string $haystack, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotContainsString', func_get_args()));
}
@@ -1777,12 +1480,10 @@ trait UnitTesterActions
/**
* [!] 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 = "") {
+ public function assertStringNotContainsStringIgnoringCase(string $needle, string $haystack, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotContainsStringIgnoringCase', func_get_args()));
}
@@ -1791,13 +1492,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertStringNotEqualsFile(string $expectedFile, string $actualString, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFile', func_get_args()));
}
@@ -1806,12 +1503,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertStringNotEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFileCanonicalizing', func_get_args()));
}
@@ -1820,13 +1514,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertStringNotEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFileIgnoringCase', func_get_args()));
}
@@ -1835,13 +1525,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertStringNotMatchesFormat(string $format, string $string, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotMatchesFormat', func_get_args()));
}
@@ -1850,13 +1536,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertStringNotMatchesFormatFile(string $formatFile, string $string, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotMatchesFormatFile', func_get_args()));
}
@@ -1865,13 +1547,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertStringStartsNotWith(string $prefix, string $string, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringStartsNotWith', func_get_args()));
}
@@ -1880,13 +1558,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertStringStartsWith(string $prefix, string $string, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringStartsWith', func_get_args()));
}
@@ -1896,12 +1570,10 @@ trait UnitTesterActions
*
* Evaluates a PHPUnit\Framework\Constraint matcher object.
*
- * @param $value
- * @param Constraint $constraint
- * @param string $message
+ * @param mixed $value
* @see \Codeception\Module\AbstractAsserts::assertThat()
*/
- public function assertThat($value, $constraint, $message = "") {
+ public function assertThat($value, \PHPUnit\Framework\Constraint\Constraint $constraint, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertThat', func_get_args()));
}
@@ -1911,11 +1583,10 @@ trait UnitTesterActions
*
* Asserts that a condition is true.
*
- * @param $condition
- * @param string $message
+ * @param mixed $condition
* @see \Codeception\Module\AbstractAsserts::assertTrue()
*/
- public function assertTrue($condition, $message = "") {
+ public function assertTrue($condition, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertTrue', func_get_args()));
}
@@ -1924,13 +1595,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlFileEqualsXmlFile', func_get_args()));
}
@@ -1939,13 +1606,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function assertXmlFileNotEqualsXmlFile(string $expectedFile, string $actualFile, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlFileNotEqualsXmlFile', func_get_args()));
}
@@ -1955,12 +1618,10 @@ trait UnitTesterActions
*
* Asserts that two XML documents are equal.
*
- * @param string $expectedFile
- * @param DOMDocument|string $actualXml
- * @param string $message
+ * @param \DOMDocument|string $actualXml
* @see \Codeception\Module\AbstractAsserts::assertXmlStringEqualsXmlFile()
*/
- public function assertXmlStringEqualsXmlFile($expectedFile, $actualXml, $message = "") {
+ public function assertXmlStringEqualsXmlFile(string $expectedFile, $actualXml, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringEqualsXmlFile', func_get_args()));
}
@@ -1970,12 +1631,11 @@ trait UnitTesterActions
*
* Asserts that two XML documents are equal.
*
- * @param DOMDocument|string $expectedXml
- * @param DOMDocument|string $actualXml
- * @param string $message
+ * @param \DOMDocument|string $expectedXml
+ * @param \DOMDocument|string $actualXml
* @see \Codeception\Module\AbstractAsserts::assertXmlStringEqualsXmlString()
*/
- public function assertXmlStringEqualsXmlString($expectedXml, $actualXml, $message = "") {
+ public function assertXmlStringEqualsXmlString($expectedXml, $actualXml, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringEqualsXmlString', func_get_args()));
}
@@ -1985,12 +1645,10 @@ trait UnitTesterActions
*
* Asserts that two XML documents are not equal.
*
- * @param string $expectedFile
- * @param DOMDocument|string $actualXml
- * @param string $message
+ * @param \DOMDocument|string $actualXml
* @see \Codeception\Module\AbstractAsserts::assertXmlStringNotEqualsXmlFile()
*/
- public function assertXmlStringNotEqualsXmlFile($expectedFile, $actualXml, $message = "") {
+ public function assertXmlStringNotEqualsXmlFile(string $expectedFile, $actualXml, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringNotEqualsXmlFile', func_get_args()));
}
@@ -2000,12 +1658,11 @@ trait UnitTesterActions
*
* Asserts that two XML documents are not equal.
*
- * @param DOMDocument|string $expectedXml
- * @param DOMDocument|string $actualXml
- * @param string $message
+ * @param \DOMDocument|string $expectedXml
+ * @param \DOMDocument|string $actualXml
* @see \Codeception\Module\AbstractAsserts::assertXmlStringNotEqualsXmlString()
*/
- public function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, $message = "") {
+ public function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringNotEqualsXmlString', func_get_args()));
}
@@ -2014,11 +1671,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function fail(string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('fail', func_get_args()));
}
@@ -2027,11 +1682,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function markTestIncomplete(string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('markTestIncomplete', func_get_args()));
}
@@ -2040,11 +1693,9 @@ trait UnitTesterActions
* [!] 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 = "") {
+ public function markTestSkipped(string $message = "") {
return $this->getScenario()->runStep(new \Codeception\Step\Action('markTestSkipped', func_get_args()));
}
}
diff --git a/tests/jsonapi/FileRefsCreateTest.php b/tests/jsonapi/FileRefsCreateTest.php
index d58e181..fe14b9f 100644
--- a/tests/jsonapi/FileRefsCreateTest.php
+++ b/tests/jsonapi/FileRefsCreateTest.php
@@ -4,7 +4,8 @@ use JsonApi\Errors\UnprocessableEntityException;
use JsonApi\Routes\Files\NegotiateFileRefsCreate as FileRefsCreate;
use JsonApi\Schemas\ContentTermsOfUse;
use JsonApi\Schemas\FileRef;
-use Slim\Psr7\Factory\ServerRequestFactory;
+use Nyholm\Psr7\Factory\Psr17Factory;
+use Nyholm\Psr7Server\ServerRequestCreator;
require_once 'FilesTestHelper.php';
@@ -153,17 +154,29 @@ class FileRefsCreateTest extends \Codeception\Test\Unit
file_put_contents($filename, $content);
}
$this->tester->assertTrue(file_exists($filename));
- $file = new \Slim\Psr7\UploadedFile($this->fileToStreamInterface($filename), $name);
+ $psr17Factory = new Psr17Factory();
+ $file = $psr17Factory->createUploadedFile(
+ stream: $psr17Factory->createStreamFromFile($filename),
+ clientFilename: $name
+ );
$app = $this->tester->createApp($credentials, 'POST', '/folders/{id}/file-refs', FileRefsCreate::class);
- $factory = new ServerRequestFactory();
$serverParams = [
+ 'REQUEST_METHOD' => 'POST',
+ 'REQUEST_URI' => '/folders/' . $folder->id . '/file-refs',
'PHP_AUTH_USER' => $credentials['username'],
'PHP_AUTH_PW' => $credentials['password'],
];
- $request = $factory->createServerRequest('POST', '/folders/' . $folder->id . '/file-refs', $serverParams);
- $request = $request->withUploadedFiles([$file])->withHeader('Content-Type', 'multipart/form-data');
+ $creator = new ServerRequestCreator(
+ $psr17Factory,
+ $psr17Factory,
+ $psr17Factory,
+ $psr17Factory
+ );
+ $request = $creator->fromArrays($serverParams)
+ ->withUploadedFiles([$file])
+ ->withHeader('Content-Type', 'multipart/form-data');
$response = $this->tester->sendMockRequest($app, $request);
$this->tester->assertSame(201, $response->getStatusCode());
@@ -214,11 +227,4 @@ class FileRefsCreateTest extends \Codeception\Test\Unit
$resourceLink = $resource->relationship('terms-of-use')->firstResourceLink();
$this->tester->assertSame($license->id, $resourceLink['id']);
}
-
- private function fileToStreamInterface(string $filename)
- {
- $factory = new \Slim\Psr7\Factory\StreamFactory();
-
- return $factory->createStreamFromFile($filename);
- }
}
diff --git a/tests/unit/lib/classes/OAuth1Test.php b/tests/unit/lib/classes/OAuth1Test.php
index 84d4fb2..a3fa8bd 100644
--- a/tests/unit/lib/classes/OAuth1Test.php
+++ b/tests/unit/lib/classes/OAuth1Test.php
@@ -1,5 +1,6 @@
<?php
+use Nyholm\Psr7\Factory\Psr17Factory;
use Psr\Http\Message\ServerRequestInterface;
use Studip\OAuth1;
@@ -84,8 +85,8 @@ final class OAuth1Test extends \Codeception\Test\Unit
private function getTestRequest(): ServerRequestInterface
{
- $factory = new Slim\Psr7\Factory\ServerRequestFactory();
- return $factory->createServerRequest(
+ $psr17Factory = new Psr17Factory();
+ return $psr17Factory->createServerRequest(
'GET',
'http://photos.example.net/photos'
)->withQueryParams([