diff --git a/composer.json b/composer.json
index f8808cbe..d38f7cac 100644
--- a/composer.json
+++ b/composer.json
@@ -90,7 +90,7 @@
"phpstan/phpstan-phpunit": "^2.0",
"phpstan/phpstan-strict-rules": "^2.0",
"phpstan/phpstan-symfony": "^2.0",
- "phpunit/phpunit": "9.5.*",
+ "phpunit/phpunit": "^10.0",
"symfony/browser-kit": "^6.0",
"symfony/css-selector": "^6.0",
"symfony/debug-bundle": "^6.0",
diff --git a/composer.lock b/composer.lock
index bd8e99a3..900bb6fc 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": "9fb3c44d9d057eaca308bc27cb107f13",
+ "content-hash": "455e6cae5b8c0ce7458599a0f317c2d3",
"packages": [
{
"name": "azuyalabs/yasumi",
@@ -698,29 +698,27 @@
},
{
"name": "doctrine/deprecations",
- "version": "1.1.3",
+ "version": "1.1.4",
"source": {
"type": "git",
"url": "https://github.com/doctrine/deprecations.git",
- "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab"
+ "reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab",
- "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab",
+ "url": "https://api.github.com/repos/doctrine/deprecations/zipball/31610dbb31faa98e6b5447b62340826f54fbc4e9",
+ "reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
- "doctrine/coding-standard": "^9",
- "phpstan/phpstan": "1.4.10 || 1.10.15",
- "phpstan/phpstan-phpunit": "^1.0",
+ "doctrine/coding-standard": "^9 || ^12",
+ "phpstan/phpstan": "1.4.10 || 2.0.3",
+ "phpstan/phpstan-phpunit": "^1.0 || ^2",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
- "psalm/plugin-phpunit": "0.18.4",
- "psr/log": "^1 || ^2 || ^3",
- "vimeo/psalm": "4.30.0 || 5.12.0"
+ "psr/log": "^1 || ^2 || ^3"
},
"suggest": {
"psr/log": "Allows logging deprecations via PSR-3 logger implementation"
@@ -728,7 +726,7 @@
"type": "library",
"autoload": {
"psr-4": {
- "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations"
+ "Doctrine\\Deprecations\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -739,9 +737,9 @@
"homepage": "https://www.doctrine-project.org/",
"support": {
"issues": "https://github.com/doctrine/deprecations/issues",
- "source": "https://github.com/doctrine/deprecations/tree/1.1.3"
+ "source": "https://github.com/doctrine/deprecations/tree/1.1.4"
},
- "time": "2024-01-30T19:34:25+00:00"
+ "time": "2024-12-07T21:18:45+00:00"
},
{
"name": "doctrine/doctrine-bundle",
@@ -1389,16 +1387,16 @@
},
{
"name": "doctrine/orm",
- "version": "2.20.0",
+ "version": "2.20.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/orm.git",
- "reference": "8ed6c2234aba019f9737a6bcc9516438e62da27c"
+ "reference": "e3cabade99ebccc6ba078884c1c5f250866a494e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/orm/zipball/8ed6c2234aba019f9737a6bcc9516438e62da27c",
- "reference": "8ed6c2234aba019f9737a6bcc9516438e62da27c",
+ "url": "https://api.github.com/repos/doctrine/orm/zipball/e3cabade99ebccc6ba078884c1c5f250866a494e",
+ "reference": "e3cabade99ebccc6ba078884c1c5f250866a494e",
"shasum": ""
},
"require": {
@@ -1428,15 +1426,14 @@
"doctrine/coding-standard": "^9.0.2 || ^12.0",
"phpbench/phpbench": "^0.16.10 || ^1.0",
"phpstan/extension-installer": "~1.1.0 || ^1.4",
- "phpstan/phpstan": "~1.4.10 || 1.12.6",
- "phpstan/phpstan-deprecation-rules": "^1",
+ "phpstan/phpstan": "~1.4.10 || 2.0.3",
+ "phpstan/phpstan-deprecation-rules": "^1 || ^2",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.6",
"psr/log": "^1 || ^2 || ^3",
"squizlabs/php_codesniffer": "3.7.2",
"symfony/cache": "^4.4 || ^5.4 || ^6.4 || ^7.0",
"symfony/var-exporter": "^4.4 || ^5.4 || ^6.2 || ^7.0",
- "symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0 || ^7.0",
- "vimeo/psalm": "4.30.0 || 5.24.0"
+ "symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0 || ^7.0"
},
"suggest": {
"ext-dom": "Provides support for XSD validation for XML mapping files",
@@ -1486,9 +1483,9 @@
],
"support": {
"issues": "https://github.com/doctrine/orm/issues",
- "source": "https://github.com/doctrine/orm/tree/2.20.0"
+ "source": "https://github.com/doctrine/orm/tree/2.20.1"
},
- "time": "2024-10-11T11:47:24+00:00"
+ "time": "2024-12-19T06:48:36+00:00"
},
{
"name": "doctrine/persistence",
@@ -2136,16 +2133,16 @@
},
{
"name": "jms/serializer",
- "version": "3.31.1",
+ "version": "3.32.1",
"source": {
"type": "git",
"url": "https://github.com/schmittjoh/serializer.git",
- "reference": "362503da26673f210221c25b99c795da718ad9aa"
+ "reference": "b4285f4197a5b961d365e2c756b144d7af24a7fd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/362503da26673f210221c25b99c795da718ad9aa",
- "reference": "362503da26673f210221c25b99c795da718ad9aa",
+ "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/b4285f4197a5b961d365e2c756b144d7af24a7fd",
+ "reference": "b4285f4197a5b961d365e2c756b144d7af24a7fd",
"shasum": ""
},
"require": {
@@ -2153,7 +2150,7 @@
"doctrine/lexer": "^2.0 || ^3.0",
"jms/metadata": "^2.6",
"php": "^7.4 || ^8.0",
- "phpstan/phpdoc-parser": "^1.20"
+ "phpstan/phpdoc-parser": "^1.20 || ^2.0"
},
"require-dev": {
"doctrine/annotations": "^1.14 || ^2.0",
@@ -2165,10 +2162,11 @@
"jackalope/jackalope-doctrine-dbal": "^1.3",
"ocramius/proxy-manager": "^1.0 || ^2.0",
"phpbench/phpbench": "^1.0",
- "phpstan/phpstan": "^1.10.57",
+ "phpstan/phpstan": "^2.0",
"phpunit/phpunit": "^9.0 || ^10.0 || ^11.0",
"psr/container": "^1.0 || ^2.0",
- "rector/rector": "^1.0.0",
+ "rector/rector": "^1.0.0 || ^2.0@dev",
+ "slevomat/coding-standard": "dev-master#f2cc4c553eae68772624ffd7dd99022343b69c31 as 8.11.9999",
"symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0",
"symfony/expression-language": "^5.4 || ^6.0 || ^7.0",
"symfony/filesystem": "^5.4 || ^6.0 || ^7.0",
@@ -2221,7 +2219,7 @@
],
"support": {
"issues": "https://github.com/schmittjoh/serializer/issues",
- "source": "https://github.com/schmittjoh/serializer/tree/3.31.1"
+ "source": "https://github.com/schmittjoh/serializer/tree/3.32.1"
},
"funding": [
{
@@ -2229,7 +2227,7 @@
"type": "github"
}
],
- "time": "2024-10-31T18:35:14+00:00"
+ "time": "2024-12-03T22:30:06+00:00"
},
{
"name": "jms/serializer-bundle",
@@ -2322,16 +2320,16 @@
},
{
"name": "kevinpapst/tabler-bundle",
- "version": "1.6.0",
+ "version": "1.6.1",
"source": {
"type": "git",
"url": "https://github.com/kevinpapst/TablerBundle.git",
- "reference": "25b2e8f6f244bff5964057f2d7825f0c81ca0e2e"
+ "reference": "d6e4ce78e8228402a2e419835913c4b1b29d0838"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/kevinpapst/TablerBundle/zipball/25b2e8f6f244bff5964057f2d7825f0c81ca0e2e",
- "reference": "25b2e8f6f244bff5964057f2d7825f0c81ca0e2e",
+ "url": "https://api.github.com/repos/kevinpapst/TablerBundle/zipball/d6e4ce78e8228402a2e419835913c4b1b29d0838",
+ "reference": "d6e4ce78e8228402a2e419835913c4b1b29d0838",
"shasum": ""
},
"require": {
@@ -2381,7 +2379,7 @@
"description": "Admin/Backend theme bundle for Symfony based on Tabler.io",
"support": {
"issues": "https://github.com/kevinpapst/TablerBundle/issues",
- "source": "https://github.com/kevinpapst/TablerBundle/tree/1.6.0"
+ "source": "https://github.com/kevinpapst/TablerBundle/tree/1.6.1"
},
"funding": [
{
@@ -2393,20 +2391,20 @@
"type": "github"
}
],
- "time": "2024-11-21T17:37:07+00:00"
+ "time": "2024-12-19T21:09:30+00:00"
},
{
"name": "league/csv",
- "version": "9.18.0",
+ "version": "9.20.1",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/csv.git",
- "reference": "b02d010e4055ae992247f6ffd1e7b103ef2a0790"
+ "reference": "491d1e79e973a7370c7571dc0fe4a7241f4936ee"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/thephpleague/csv/zipball/b02d010e4055ae992247f6ffd1e7b103ef2a0790",
- "reference": "b02d010e4055ae992247f6ffd1e7b103ef2a0790",
+ "url": "https://api.github.com/repos/thephpleague/csv/zipball/491d1e79e973a7370c7571dc0fe4a7241f4936ee",
+ "reference": "491d1e79e973a7370c7571dc0fe4a7241f4936ee",
"shasum": ""
},
"require": {
@@ -2418,12 +2416,12 @@
"ext-xdebug": "*",
"friendsofphp/php-cs-fixer": "^3.64.0",
"phpbench/phpbench": "^1.3.1",
- "phpstan/phpstan": "^1.12.6",
+ "phpstan/phpstan": "^1.12.11",
"phpstan/phpstan-deprecation-rules": "^1.2.1",
- "phpstan/phpstan-phpunit": "^1.4.0",
+ "phpstan/phpstan-phpunit": "^1.4.1",
"phpstan/phpstan-strict-rules": "^1.6.1",
- "phpunit/phpunit": "^10.5.16 || ^11.4.1",
- "symfony/var-dumper": "^6.4.8 || ^7.1.5"
+ "phpunit/phpunit": "^10.5.16 || ^11.4.3",
+ "symfony/var-dumper": "^6.4.8 || ^7.1.8"
},
"suggest": {
"ext-dom": "Required to use the XMLConverter and the HTMLConverter classes",
@@ -2480,7 +2478,7 @@
"type": "github"
}
],
- "time": "2024-10-18T08:14:48+00:00"
+ "time": "2024-12-18T10:11:15+00:00"
},
{
"name": "lorenzo/pinky",
@@ -2721,16 +2719,16 @@
},
{
"name": "monolog/monolog",
- "version": "3.8.0",
+ "version": "3.8.1",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
- "reference": "32e515fdc02cdafbe4593e30a9350d486b125b67"
+ "reference": "aef6ee73a77a66e404dd6540934a9ef1b3c855b4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Seldaek/monolog/zipball/32e515fdc02cdafbe4593e30a9350d486b125b67",
- "reference": "32e515fdc02cdafbe4593e30a9350d486b125b67",
+ "url": "https://api.github.com/repos/Seldaek/monolog/zipball/aef6ee73a77a66e404dd6540934a9ef1b3c855b4",
+ "reference": "aef6ee73a77a66e404dd6540934a9ef1b3c855b4",
"shasum": ""
},
"require": {
@@ -2808,7 +2806,7 @@
],
"support": {
"issues": "https://github.com/Seldaek/monolog/issues",
- "source": "https://github.com/Seldaek/monolog/tree/3.8.0"
+ "source": "https://github.com/Seldaek/monolog/tree/3.8.1"
},
"funding": [
{
@@ -2820,7 +2818,7 @@
"type": "tidelift"
}
],
- "time": "2024-11-12T13:57:08+00:00"
+ "time": "2024-12-05T17:15:07+00:00"
},
{
"name": "mpdf/mpdf",
@@ -3578,16 +3576,16 @@
},
{
"name": "phpdocumentor/reflection-docblock",
- "version": "5.6.0",
+ "version": "5.6.1",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
- "reference": "f3558a4c23426d12bffeaab463f8a8d8b681193c"
+ "reference": "e5e784149a09bd69d9a5e3b01c5cbd2e2bd653d8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/f3558a4c23426d12bffeaab463f8a8d8b681193c",
- "reference": "f3558a4c23426d12bffeaab463f8a8d8b681193c",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e5e784149a09bd69d9a5e3b01c5cbd2e2bd653d8",
+ "reference": "e5e784149a09bd69d9a5e3b01c5cbd2e2bd653d8",
"shasum": ""
},
"require": {
@@ -3636,9 +3634,9 @@
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"support": {
"issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
- "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.0"
+ "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.1"
},
- "time": "2024-11-12T11:25:25+00:00"
+ "time": "2024-12-07T09:39:29+00:00"
},
{
"name": "phpdocumentor/type-resolver",
@@ -3752,16 +3750,16 @@
},
{
"name": "phpoffice/phpspreadsheet",
- "version": "2.3.3",
+ "version": "2.3.4",
"source": {
"type": "git",
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
- "reference": "91a4b42e41976a0b2f839720c3e20a12a84f6852"
+ "reference": "01c4122a12327378ab5d97a56a4cbab07e7fa70b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/91a4b42e41976a0b2f839720c3e20a12a84f6852",
- "reference": "91a4b42e41976a0b2f839720c3e20a12a84f6852",
+ "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/01c4122a12327378ab5d97a56a4cbab07e7fa70b",
+ "reference": "01c4122a12327378ab5d97a56a4cbab07e7fa70b",
"shasum": ""
},
"require": {
@@ -3850,9 +3848,9 @@
],
"support": {
"issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
- "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/2.3.3"
+ "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/2.3.4"
},
- "time": "2024-11-22T06:11:37+00:00"
+ "time": "2024-12-08T15:43:45+00:00"
},
{
"name": "phpoffice/phpword",
@@ -3965,30 +3963,30 @@
},
{
"name": "phpstan/phpdoc-parser",
- "version": "1.33.0",
+ "version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git",
- "reference": "82a311fd3690fb2bf7b64d5c98f912b3dd746140"
+ "reference": "c00d78fb6b29658347f9d37ebe104bffadf36299"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/82a311fd3690fb2bf7b64d5c98f912b3dd746140",
- "reference": "82a311fd3690fb2bf7b64d5c98f912b3dd746140",
+ "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/c00d78fb6b29658347f9d37ebe104bffadf36299",
+ "reference": "c00d78fb6b29658347f9d37ebe104bffadf36299",
"shasum": ""
},
"require": {
- "php": "^7.2 || ^8.0"
+ "php": "^7.4 || ^8.0"
},
"require-dev": {
"doctrine/annotations": "^2.0",
- "nikic/php-parser": "^4.15",
+ "nikic/php-parser": "^5.3.0",
"php-parallel-lint/php-parallel-lint": "^1.2",
"phpstan/extension-installer": "^1.0",
- "phpstan/phpstan": "^1.5",
- "phpstan/phpstan-phpunit": "^1.1",
- "phpstan/phpstan-strict-rules": "^1.0",
- "phpunit/phpunit": "^9.5",
+ "phpstan/phpstan": "^2.0",
+ "phpstan/phpstan-phpunit": "^2.0",
+ "phpstan/phpstan-strict-rules": "^2.0",
+ "phpunit/phpunit": "^9.6",
"symfony/process": "^5.2"
},
"type": "library",
@@ -4006,9 +4004,9 @@
"description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": {
"issues": "https://github.com/phpstan/phpdoc-parser/issues",
- "source": "https://github.com/phpstan/phpdoc-parser/tree/1.33.0"
+ "source": "https://github.com/phpstan/phpdoc-parser/tree/2.0.0"
},
- "time": "2024-10-13T11:25:22+00:00"
+ "time": "2024-10-13T11:29:49+00:00"
},
{
"name": "psr/cache",
@@ -4683,16 +4681,16 @@
},
{
"name": "setasign/fpdi",
- "version": "v2.6.1",
+ "version": "v2.6.2",
"source": {
"type": "git",
"url": "https://github.com/Setasign/FPDI.git",
- "reference": "09a816004fcee9ed3405bd164147e3fdbb79a56f"
+ "reference": "9e013b376939c0d4029f54150d2a16f3c67a5797"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Setasign/FPDI/zipball/09a816004fcee9ed3405bd164147e3fdbb79a56f",
- "reference": "09a816004fcee9ed3405bd164147e3fdbb79a56f",
+ "url": "https://api.github.com/repos/Setasign/FPDI/zipball/9e013b376939c0d4029f54150d2a16f3c67a5797",
+ "reference": "9e013b376939c0d4029f54150d2a16f3c67a5797",
"shasum": ""
},
"require": {
@@ -4743,7 +4741,7 @@
],
"support": {
"issues": "https://github.com/Setasign/FPDI/issues",
- "source": "https://github.com/Setasign/FPDI/tree/v2.6.1"
+ "source": "https://github.com/Setasign/FPDI/tree/v2.6.2"
},
"funding": [
{
@@ -4751,7 +4749,7 @@
"type": "tidelift"
}
],
- "time": "2024-09-02T10:17:15+00:00"
+ "time": "2024-12-10T13:12:19+00:00"
},
{
"name": "spomky-labs/otphp",
@@ -6548,16 +6546,16 @@
},
{
"name": "symfony/http-client-contracts",
- "version": "v3.5.1",
+ "version": "v3.5.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-client-contracts.git",
- "reference": "c2f3ad828596624ca39ea40f83617ef51ca8bbf9"
+ "reference": "ee8d807ab20fcb51267fdace50fbe3494c31e645"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/c2f3ad828596624ca39ea40f83617ef51ca8bbf9",
- "reference": "c2f3ad828596624ca39ea40f83617ef51ca8bbf9",
+ "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/ee8d807ab20fcb51267fdace50fbe3494c31e645",
+ "reference": "ee8d807ab20fcb51267fdace50fbe3494c31e645",
"shasum": ""
},
"require": {
@@ -6565,12 +6563,12 @@
},
"type": "library",
"extra": {
+ "thanks": {
+ "url": "https://github.com/symfony/contracts",
+ "name": "symfony/contracts"
+ },
"branch-alias": {
"dev-main": "3.5-dev"
- },
- "thanks": {
- "name": "symfony/contracts",
- "url": "https://github.com/symfony/contracts"
}
},
"autoload": {
@@ -6606,7 +6604,7 @@
"standards"
],
"support": {
- "source": "https://github.com/symfony/http-client-contracts/tree/v3.5.1"
+ "source": "https://github.com/symfony/http-client-contracts/tree/v3.5.2"
},
"funding": [
{
@@ -6622,7 +6620,7 @@
"type": "tidelift"
}
],
- "time": "2024-11-25T12:02:18+00:00"
+ "time": "2024-12-07T08:49:48+00:00"
},
{
"name": "symfony/http-foundation",
@@ -7382,8 +7380,8 @@
"type": "library",
"extra": {
"thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
}
},
"autoload": {
@@ -9347,31 +9345,33 @@
},
{
"name": "tijsverkoyen/css-to-inline-styles",
- "version": "v2.2.7",
+ "version": "v2.3.0",
"source": {
"type": "git",
"url": "https://github.com/tijsverkoyen/CssToInlineStyles.git",
- "reference": "83ee6f38df0a63106a9e4536e3060458b74ccedb"
+ "reference": "0d72ac1c00084279c1816675284073c5a337c20d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/83ee6f38df0a63106a9e4536e3060458b74ccedb",
- "reference": "83ee6f38df0a63106a9e4536e3060458b74ccedb",
+ "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/0d72ac1c00084279c1816675284073c5a337c20d",
+ "reference": "0d72ac1c00084279c1816675284073c5a337c20d",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-libxml": "*",
- "php": "^5.5 || ^7.0 || ^8.0",
- "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0"
+ "php": "^7.4 || ^8.0",
+ "symfony/css-selector": "^5.4 || ^6.0 || ^7.0"
},
"require-dev": {
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5 || ^8.5.21 || ^9.5.10"
+ "phpstan/phpstan": "^2.0",
+ "phpstan/phpstan-phpunit": "^2.0",
+ "phpunit/phpunit": "^8.5.21 || ^9.5.10"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.2.x-dev"
+ "dev-master": "2.x-dev"
}
},
"autoload": {
@@ -9394,13 +9394,13 @@
"homepage": "https://github.com/tijsverkoyen/CssToInlineStyles",
"support": {
"issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues",
- "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/v2.2.7"
+ "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/v2.3.0"
},
- "time": "2023-12-08T13:03:43+00:00"
+ "time": "2024-12-21T16:25:41+00:00"
},
{
"name": "twig/cssinliner-extra",
- "version": "v3.16.0",
+ "version": "v3.17.0",
"source": {
"type": "git",
"url": "https://github.com/twigphp/cssinliner-extra.git",
@@ -9453,7 +9453,7 @@
"twig"
],
"support": {
- "source": "https://github.com/twigphp/cssinliner-extra/tree/v3.16.0"
+ "source": "https://github.com/twigphp/cssinliner-extra/tree/v3.17.0"
},
"funding": [
{
@@ -9469,7 +9469,7 @@
},
{
"name": "twig/extra-bundle",
- "version": "v3.16.0",
+ "version": "v3.17.0",
"source": {
"type": "git",
"url": "https://github.com/twigphp/twig-extra-bundle.git",
@@ -9527,7 +9527,7 @@
"twig"
],
"support": {
- "source": "https://github.com/twigphp/twig-extra-bundle/tree/v3.16.0"
+ "source": "https://github.com/twigphp/twig-extra-bundle/tree/v3.17.0"
},
"funding": [
{
@@ -9543,7 +9543,7 @@
},
{
"name": "twig/inky-extra",
- "version": "v3.16.0",
+ "version": "v3.17.0",
"source": {
"type": "git",
"url": "https://github.com/twigphp/inky-extra.git",
@@ -9597,7 +9597,7 @@
"twig"
],
"support": {
- "source": "https://github.com/twigphp/inky-extra/tree/v3.16.0"
+ "source": "https://github.com/twigphp/inky-extra/tree/v3.17.0"
},
"funding": [
{
@@ -9613,7 +9613,7 @@
},
{
"name": "twig/intl-extra",
- "version": "v3.16.0",
+ "version": "v3.17.0",
"source": {
"type": "git",
"url": "https://github.com/twigphp/intl-extra.git",
@@ -9661,7 +9661,7 @@
"twig"
],
"support": {
- "source": "https://github.com/twigphp/intl-extra/tree/v3.16.0"
+ "source": "https://github.com/twigphp/intl-extra/tree/v3.17.0"
},
"funding": [
{
@@ -9677,16 +9677,16 @@
},
{
"name": "twig/string-extra",
- "version": "v3.16.0",
+ "version": "v3.17.0",
"source": {
"type": "git",
"url": "https://github.com/twigphp/string-extra.git",
- "reference": "3f90208078a7d55ad4a561301ee3929d3e3840e0"
+ "reference": "cb4eec11de02f63ad8ea9d065a1f27752d0bf752"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/twigphp/string-extra/zipball/3f90208078a7d55ad4a561301ee3929d3e3840e0",
- "reference": "3f90208078a7d55ad4a561301ee3929d3e3840e0",
+ "url": "https://api.github.com/repos/twigphp/string-extra/zipball/cb4eec11de02f63ad8ea9d065a1f27752d0bf752",
+ "reference": "cb4eec11de02f63ad8ea9d065a1f27752d0bf752",
"shasum": ""
},
"require": {
@@ -9728,7 +9728,7 @@
"unicode"
],
"support": {
- "source": "https://github.com/twigphp/string-extra/tree/v3.16.0"
+ "source": "https://github.com/twigphp/string-extra/tree/v3.17.0"
},
"funding": [
{
@@ -9740,20 +9740,20 @@
"type": "tidelift"
}
],
- "time": "2024-11-20T13:10:15+00:00"
+ "time": "2024-11-30T08:42:13+00:00"
},
{
"name": "twig/twig",
- "version": "v3.16.0",
+ "version": "v3.17.1",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
- "reference": "475ad2dc97d65d8631393e721e7e44fb544f0561"
+ "reference": "677ef8da6497a03048192aeeb5aa3018e379ac71"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/twigphp/Twig/zipball/475ad2dc97d65d8631393e721e7e44fb544f0561",
- "reference": "475ad2dc97d65d8631393e721e7e44fb544f0561",
+ "url": "https://api.github.com/repos/twigphp/Twig/zipball/677ef8da6497a03048192aeeb5aa3018e379ac71",
+ "reference": "677ef8da6497a03048192aeeb5aa3018e379ac71",
"shasum": ""
},
"require": {
@@ -9808,7 +9808,7 @@
],
"support": {
"issues": "https://github.com/twigphp/Twig/issues",
- "source": "https://github.com/twigphp/Twig/tree/v3.16.0"
+ "source": "https://github.com/twigphp/Twig/tree/v3.17.1"
},
"funding": [
{
@@ -9820,7 +9820,7 @@
"type": "tidelift"
}
],
- "time": "2024-11-29T08:27:05+00:00"
+ "time": "2024-12-12T09:58:10+00:00"
},
{
"name": "webmozart/assert",
@@ -10153,13 +10153,13 @@
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-main": "3.x-dev"
- },
"phpstan": {
"includes": [
"extension.neon"
]
+ },
+ "branch-alias": {
+ "dev-main": "3.x-dev"
}
},
"autoload": {
@@ -10340,16 +10340,16 @@
},
{
"name": "doctrine/data-fixtures",
- "version": "2.0.0",
+ "version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/data-fixtures.git",
- "reference": "eddc4c37beff550a9172a449ab285f4511573dc8"
+ "reference": "2ae45139f148c9272c49a521d82cc50491355a99"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/data-fixtures/zipball/eddc4c37beff550a9172a449ab285f4511573dc8",
- "reference": "eddc4c37beff550a9172a449ab285f4511573dc8",
+ "url": "https://api.github.com/repos/doctrine/data-fixtures/zipball/2ae45139f148c9272c49a521d82cc50491355a99",
+ "reference": "2ae45139f148c9272c49a521d82cc50491355a99",
"shasum": ""
},
"require": {
@@ -10403,7 +10403,7 @@
],
"support": {
"issues": "https://github.com/doctrine/data-fixtures/issues",
- "source": "https://github.com/doctrine/data-fixtures/tree/2.0.0"
+ "source": "https://github.com/doctrine/data-fixtures/tree/2.0.1"
},
"funding": [
{
@@ -10419,44 +10419,44 @@
"type": "tidelift"
}
],
- "time": "2024-11-06T07:58:24+00:00"
+ "time": "2024-12-10T07:03:23+00:00"
},
{
"name": "doctrine/doctrine-fixtures-bundle",
- "version": "3.7.0",
+ "version": "3.7.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/DoctrineFixturesBundle.git",
- "reference": "3004c9b3ac3d2a8f484597416ae1882040b3ef3b"
+ "reference": "bd59519a7532b9e1a41cef4049d5326dfac7def9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/DoctrineFixturesBundle/zipball/3004c9b3ac3d2a8f484597416ae1882040b3ef3b",
- "reference": "3004c9b3ac3d2a8f484597416ae1882040b3ef3b",
+ "url": "https://api.github.com/repos/doctrine/DoctrineFixturesBundle/zipball/bd59519a7532b9e1a41cef4049d5326dfac7def9",
+ "reference": "bd59519a7532b9e1a41cef4049d5326dfac7def9",
"shasum": ""
},
"require": {
- "doctrine/data-fixtures": "^1.5|^2.0",
+ "doctrine/data-fixtures": "^1.5 || ^2.0",
"doctrine/doctrine-bundle": "^2.2",
"doctrine/orm": "^2.14.0 || ^3.0",
- "doctrine/persistence": "^2.4|^3.0",
+ "doctrine/persistence": "^2.4 || ^3.0",
"php": "^7.4 || ^8.0",
- "symfony/config": "^5.4|^6.0|^7.0",
- "symfony/console": "^5.4|^6.0|^7.0",
- "symfony/dependency-injection": "^5.4|^6.0|^7.0",
- "symfony/deprecation-contracts": "^2.1|^3",
- "symfony/doctrine-bridge": "^5.4.48|^6.4.16|^7.1.9",
- "symfony/http-kernel": "^5.4|^6.0|^7.0"
+ "psr/log": "^1 || ^2 || ^3",
+ "symfony/config": "^5.4 || ^6.0 || ^7.0",
+ "symfony/console": "^5.4 || ^6.0 || ^7.0",
+ "symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0",
+ "symfony/deprecation-contracts": "^2.1 || ^3",
+ "symfony/doctrine-bridge": "^5.4.48 || ^6.4.16 || ^7.1.9",
+ "symfony/http-kernel": "^5.4 || ^6.0 || ^7.0"
},
"conflict": {
"doctrine/dbal": "< 3"
},
"require-dev": {
"doctrine/coding-standard": "^12",
- "phpstan/phpstan": "^1.10.39",
+ "phpstan/phpstan": "^2",
"phpunit/phpunit": "^9.6.13",
- "symfony/phpunit-bridge": "^6.3.6",
- "vimeo/psalm": "^5.15"
+ "symfony/phpunit-bridge": "^6.3.6"
},
"type": "symfony-bundle",
"autoload": {
@@ -10490,7 +10490,7 @@
],
"support": {
"issues": "https://github.com/doctrine/DoctrineFixturesBundle/issues",
- "source": "https://github.com/doctrine/DoctrineFixturesBundle/tree/3.7.0"
+ "source": "https://github.com/doctrine/DoctrineFixturesBundle/tree/3.7.1"
},
"funding": [
{
@@ -10506,7 +10506,7 @@
"type": "tidelift"
}
],
- "time": "2024-11-28T07:19:21+00:00"
+ "time": "2024-12-03T17:07:51+00:00"
},
{
"name": "evenement/evenement",
@@ -11027,16 +11027,16 @@
},
{
"name": "phpstan/phpstan",
- "version": "2.0.3",
+ "version": "2.0.4",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
- "reference": "46b4d3529b12178112d9008337beda0cc2a1a6b4"
+ "reference": "50d276fc3bf1430ec315f2f109bbde2769821524"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/46b4d3529b12178112d9008337beda0cc2a1a6b4",
- "reference": "46b4d3529b12178112d9008337beda0cc2a1a6b4",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/50d276fc3bf1430ec315f2f109bbde2769821524",
+ "reference": "50d276fc3bf1430ec315f2f109bbde2769821524",
"shasum": ""
},
"require": {
@@ -11081,7 +11081,7 @@
"type": "github"
}
],
- "time": "2024-11-28T22:19:37+00:00"
+ "time": "2024-12-17T17:14:01+00:00"
},
{
"name": "phpstan/phpstan-deprecation-rules",
@@ -11203,21 +11203,21 @@
},
{
"name": "phpstan/phpstan-phpunit",
- "version": "2.0.1",
+ "version": "2.0.3",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan-phpunit.git",
- "reference": "4b6ad7fab8683ff4efd7887ba26ef8ee171c7475"
+ "reference": "e32ac656788a5bf3dedda89e6a2cad5643bf1a18"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/4b6ad7fab8683ff4efd7887ba26ef8ee171c7475",
- "reference": "4b6ad7fab8683ff4efd7887ba26ef8ee171c7475",
+ "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/e32ac656788a5bf3dedda89e6a2cad5643bf1a18",
+ "reference": "e32ac656788a5bf3dedda89e6a2cad5643bf1a18",
"shasum": ""
},
"require": {
"php": "^7.4 || ^8.0",
- "phpstan/phpstan": "^2.0"
+ "phpstan/phpstan": "^2.0.4"
},
"conflict": {
"phpunit/phpunit": "<7.0"
@@ -11248,27 +11248,27 @@
"description": "PHPUnit extensions and rules for PHPStan",
"support": {
"issues": "https://github.com/phpstan/phpstan-phpunit/issues",
- "source": "https://github.com/phpstan/phpstan-phpunit/tree/2.0.1"
+ "source": "https://github.com/phpstan/phpstan-phpunit/tree/2.0.3"
},
- "time": "2024-11-12T12:48:00+00:00"
+ "time": "2024-12-19T09:14:43+00:00"
},
{
"name": "phpstan/phpstan-strict-rules",
- "version": "2.0.0",
+ "version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan-strict-rules.git",
- "reference": "a4a6a08bd4a461e516b9c3b8fdbf0f1883b34158"
+ "reference": "ed6fea0ad4ad9c7e25f3ad2e7c4d420cf1e67fe3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/a4a6a08bd4a461e516b9c3b8fdbf0f1883b34158",
- "reference": "a4a6a08bd4a461e516b9c3b8fdbf0f1883b34158",
+ "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/ed6fea0ad4ad9c7e25f3ad2e7c4d420cf1e67fe3",
+ "reference": "ed6fea0ad4ad9c7e25f3ad2e7c4d420cf1e67fe3",
"shasum": ""
},
"require": {
"php": "^7.4 || ^8.0",
- "phpstan/phpstan": "^2.0"
+ "phpstan/phpstan": "^2.0.4"
},
"require-dev": {
"php-parallel-lint/php-parallel-lint": "^1.2",
@@ -11296,9 +11296,9 @@
"description": "Extra strict and opinionated rules for PHPStan",
"support": {
"issues": "https://github.com/phpstan/phpstan-strict-rules/issues",
- "source": "https://github.com/phpstan/phpstan-strict-rules/tree/2.0.0"
+ "source": "https://github.com/phpstan/phpstan-strict-rules/tree/2.0.1"
},
- "time": "2024-10-26T16:04:33+00:00"
+ "time": "2024-12-12T20:21:10+00:00"
},
{
"name": "phpstan/phpstan-symfony",
@@ -11373,16 +11373,16 @@
},
{
"name": "phpunit/php-code-coverage",
- "version": "9.2.32",
+ "version": "10.1.16",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5"
+ "reference": "7e308268858ed6baedc8704a304727d20bc07c77"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5",
- "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7e308268858ed6baedc8704a304727d20bc07c77",
+ "reference": "7e308268858ed6baedc8704a304727d20bc07c77",
"shasum": ""
},
"require": {
@@ -11390,18 +11390,18 @@
"ext-libxml": "*",
"ext-xmlwriter": "*",
"nikic/php-parser": "^4.19.1 || ^5.1.0",
- "php": ">=7.3",
- "phpunit/php-file-iterator": "^3.0.6",
- "phpunit/php-text-template": "^2.0.4",
- "sebastian/code-unit-reverse-lookup": "^2.0.3",
- "sebastian/complexity": "^2.0.3",
- "sebastian/environment": "^5.1.5",
- "sebastian/lines-of-code": "^1.0.4",
- "sebastian/version": "^3.0.2",
+ "php": ">=8.1",
+ "phpunit/php-file-iterator": "^4.1.0",
+ "phpunit/php-text-template": "^3.0.1",
+ "sebastian/code-unit-reverse-lookup": "^3.0.0",
+ "sebastian/complexity": "^3.2.0",
+ "sebastian/environment": "^6.1.0",
+ "sebastian/lines-of-code": "^2.0.2",
+ "sebastian/version": "^4.0.1",
"theseer/tokenizer": "^1.2.3"
},
"require-dev": {
- "phpunit/phpunit": "^9.6"
+ "phpunit/phpunit": "^10.1"
},
"suggest": {
"ext-pcov": "PHP extension that provides line coverage",
@@ -11410,7 +11410,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "9.2.x-dev"
+ "dev-main": "10.1.x-dev"
}
},
"autoload": {
@@ -11439,7 +11439,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
- "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32"
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.16"
},
"funding": [
{
@@ -11447,32 +11447,32 @@
"type": "github"
}
],
- "time": "2024-08-22T04:23:01+00:00"
+ "time": "2024-08-22T04:31:57+00:00"
},
{
"name": "phpunit/php-file-iterator",
- "version": "3.0.6",
+ "version": "4.1.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf"
+ "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf",
- "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c",
+ "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.0-dev"
+ "dev-main": "4.0-dev"
}
},
"autoload": {
@@ -11499,7 +11499,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
- "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6"
+ "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy",
+ "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0"
},
"funding": [
{
@@ -11507,28 +11508,28 @@
"type": "github"
}
],
- "time": "2021-12-02T12:48:52+00:00"
+ "time": "2023-08-31T06:24:48+00:00"
},
{
"name": "phpunit/php-invoker",
- "version": "3.1.1",
+ "version": "4.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-invoker.git",
- "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67"
+ "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
- "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7",
+ "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
"ext-pcntl": "*",
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"suggest": {
"ext-pcntl": "*"
@@ -11536,7 +11537,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.1-dev"
+ "dev-main": "4.0-dev"
}
},
"autoload": {
@@ -11562,7 +11563,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-invoker/issues",
- "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1"
+ "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0"
},
"funding": [
{
@@ -11570,32 +11571,32 @@
"type": "github"
}
],
- "time": "2020-09-28T05:58:55+00:00"
+ "time": "2023-02-03T06:56:09+00:00"
},
{
"name": "phpunit/php-text-template",
- "version": "2.0.4",
+ "version": "3.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-text-template.git",
- "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28"
+ "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
- "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748",
+ "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-main": "3.0-dev"
}
},
"autoload": {
@@ -11621,7 +11622,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-text-template/issues",
- "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4"
+ "security": "https://github.com/sebastianbergmann/php-text-template/security/policy",
+ "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1"
},
"funding": [
{
@@ -11629,32 +11631,32 @@
"type": "github"
}
],
- "time": "2020-10-26T05:33:50+00:00"
+ "time": "2023-08-31T14:07:24+00:00"
},
{
"name": "phpunit/php-timer",
- "version": "5.0.3",
+ "version": "6.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2"
+ "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
- "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d",
+ "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.0-dev"
+ "dev-main": "6.0-dev"
}
},
"autoload": {
@@ -11680,7 +11682,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-timer/issues",
- "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3"
+ "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0"
},
"funding": [
{
@@ -11688,54 +11690,52 @@
"type": "github"
}
],
- "time": "2020-10-26T13:16:10+00:00"
+ "time": "2023-02-03T06:57:52+00:00"
},
{
"name": "phpunit/phpunit",
- "version": "9.5.28",
+ "version": "10.5.40",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "954ca3113a03bf780d22f07bf055d883ee04b65e"
+ "reference": "e6ddda95af52f69c1e0c7b4f977cccb58048798c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/954ca3113a03bf780d22f07bf055d883ee04b65e",
- "reference": "954ca3113a03bf780d22f07bf055d883ee04b65e",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e6ddda95af52f69c1e0c7b4f977cccb58048798c",
+ "reference": "e6ddda95af52f69c1e0c7b4f977cccb58048798c",
"shasum": ""
},
"require": {
- "doctrine/instantiator": "^1.3.1 || ^2",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
"ext-xmlwriter": "*",
- "myclabs/deep-copy": "^1.10.1",
- "phar-io/manifest": "^2.0.3",
- "phar-io/version": "^3.0.2",
- "php": ">=7.3",
- "phpunit/php-code-coverage": "^9.2.13",
- "phpunit/php-file-iterator": "^3.0.5",
- "phpunit/php-invoker": "^3.1.1",
- "phpunit/php-text-template": "^2.0.3",
- "phpunit/php-timer": "^5.0.2",
- "sebastian/cli-parser": "^1.0.1",
- "sebastian/code-unit": "^1.0.6",
- "sebastian/comparator": "^4.0.8",
- "sebastian/diff": "^4.0.3",
- "sebastian/environment": "^5.1.3",
- "sebastian/exporter": "^4.0.5",
- "sebastian/global-state": "^5.0.1",
- "sebastian/object-enumerator": "^4.0.3",
- "sebastian/resource-operations": "^3.0.3",
- "sebastian/type": "^3.2",
- "sebastian/version": "^3.0.2"
+ "myclabs/deep-copy": "^1.12.1",
+ "phar-io/manifest": "^2.0.4",
+ "phar-io/version": "^3.2.1",
+ "php": ">=8.1",
+ "phpunit/php-code-coverage": "^10.1.16",
+ "phpunit/php-file-iterator": "^4.1.0",
+ "phpunit/php-invoker": "^4.0.0",
+ "phpunit/php-text-template": "^3.0.1",
+ "phpunit/php-timer": "^6.0.0",
+ "sebastian/cli-parser": "^2.0.1",
+ "sebastian/code-unit": "^2.0.0",
+ "sebastian/comparator": "^5.0.3",
+ "sebastian/diff": "^5.1.1",
+ "sebastian/environment": "^6.1.0",
+ "sebastian/exporter": "^5.1.2",
+ "sebastian/global-state": "^6.0.2",
+ "sebastian/object-enumerator": "^5.0.0",
+ "sebastian/recursion-context": "^5.0.0",
+ "sebastian/type": "^4.0.0",
+ "sebastian/version": "^4.0.1"
},
"suggest": {
- "ext-soap": "*",
- "ext-xdebug": "*"
+ "ext-soap": "To be able to generate mocks based on WSDL files"
},
"bin": [
"phpunit"
@@ -11743,7 +11743,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "9.5-dev"
+ "dev-main": "10.5-dev"
}
},
"autoload": {
@@ -11774,7 +11774,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.28"
+ "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.40"
},
"funding": [
{
@@ -11790,7 +11791,7 @@
"type": "tidelift"
}
],
- "time": "2023-01-14T12:32:24+00:00"
+ "time": "2024-12-21T05:49:06+00:00"
},
{
"name": "react/cache",
@@ -12324,28 +12325,28 @@
},
{
"name": "sebastian/cli-parser",
- "version": "1.0.2",
+ "version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/cli-parser.git",
- "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b"
+ "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b",
- "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b",
+ "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084",
+ "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0-dev"
+ "dev-main": "2.0-dev"
}
},
"autoload": {
@@ -12368,7 +12369,8 @@
"homepage": "https://github.com/sebastianbergmann/cli-parser",
"support": {
"issues": "https://github.com/sebastianbergmann/cli-parser/issues",
- "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2"
+ "security": "https://github.com/sebastianbergmann/cli-parser/security/policy",
+ "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.1"
},
"funding": [
{
@@ -12376,32 +12378,32 @@
"type": "github"
}
],
- "time": "2024-03-02T06:27:43+00:00"
+ "time": "2024-03-02T07:12:49+00:00"
},
{
"name": "sebastian/code-unit",
- "version": "1.0.8",
+ "version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit.git",
- "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120"
+ "reference": "a81fee9eef0b7a76af11d121767abc44c104e503"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120",
- "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503",
+ "reference": "a81fee9eef0b7a76af11d121767abc44c104e503",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0-dev"
+ "dev-main": "2.0-dev"
}
},
"autoload": {
@@ -12424,7 +12426,7 @@
"homepage": "https://github.com/sebastianbergmann/code-unit",
"support": {
"issues": "https://github.com/sebastianbergmann/code-unit/issues",
- "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8"
+ "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0"
},
"funding": [
{
@@ -12432,32 +12434,32 @@
"type": "github"
}
],
- "time": "2020-10-26T13:08:54+00:00"
+ "time": "2023-02-03T06:58:43+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
- "version": "2.0.3",
+ "version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
- "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5"
+ "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
- "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d",
+ "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-main": "3.0-dev"
}
},
"autoload": {
@@ -12479,7 +12481,7 @@
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
"support": {
"issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues",
- "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3"
+ "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0"
},
"funding": [
{
@@ -12487,34 +12489,36 @@
"type": "github"
}
],
- "time": "2020-09-28T05:30:19+00:00"
+ "time": "2023-02-03T06:59:15+00:00"
},
{
"name": "sebastian/comparator",
- "version": "4.0.8",
+ "version": "5.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "fa0f136dd2334583309d32b62544682ee972b51a"
+ "reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a",
- "reference": "fa0f136dd2334583309d32b62544682ee972b51a",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e",
+ "reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e",
"shasum": ""
},
"require": {
- "php": ">=7.3",
- "sebastian/diff": "^4.0",
- "sebastian/exporter": "^4.0"
+ "ext-dom": "*",
+ "ext-mbstring": "*",
+ "php": ">=8.1",
+ "sebastian/diff": "^5.0",
+ "sebastian/exporter": "^5.0"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0-dev"
+ "dev-main": "5.0-dev"
}
},
"autoload": {
@@ -12553,7 +12557,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/comparator/issues",
- "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8"
+ "security": "https://github.com/sebastianbergmann/comparator/security/policy",
+ "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.3"
},
"funding": [
{
@@ -12561,33 +12566,33 @@
"type": "github"
}
],
- "time": "2022-09-14T12:41:17+00:00"
+ "time": "2024-10-18T14:56:07+00:00"
},
{
"name": "sebastian/complexity",
- "version": "2.0.3",
+ "version": "3.2.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/complexity.git",
- "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a"
+ "reference": "68ff824baeae169ec9f2137158ee529584553799"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a",
- "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a",
+ "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799",
+ "reference": "68ff824baeae169ec9f2137158ee529584553799",
"shasum": ""
},
"require": {
"nikic/php-parser": "^4.18 || ^5.0",
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-main": "3.2-dev"
}
},
"autoload": {
@@ -12610,7 +12615,8 @@
"homepage": "https://github.com/sebastianbergmann/complexity",
"support": {
"issues": "https://github.com/sebastianbergmann/complexity/issues",
- "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3"
+ "security": "https://github.com/sebastianbergmann/complexity/security/policy",
+ "source": "https://github.com/sebastianbergmann/complexity/tree/3.2.0"
},
"funding": [
{
@@ -12618,33 +12624,33 @@
"type": "github"
}
],
- "time": "2023-12-22T06:19:30+00:00"
+ "time": "2023-12-21T08:37:17+00:00"
},
{
"name": "sebastian/diff",
- "version": "4.0.6",
+ "version": "5.1.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc"
+ "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc",
- "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e",
+ "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3",
- "symfony/process": "^4.2 || ^5"
+ "phpunit/phpunit": "^10.0",
+ "symfony/process": "^6.4"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0-dev"
+ "dev-main": "5.1-dev"
}
},
"autoload": {
@@ -12676,7 +12682,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/diff/issues",
- "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6"
+ "security": "https://github.com/sebastianbergmann/diff/security/policy",
+ "source": "https://github.com/sebastianbergmann/diff/tree/5.1.1"
},
"funding": [
{
@@ -12684,27 +12691,27 @@
"type": "github"
}
],
- "time": "2024-03-02T06:30:58+00:00"
+ "time": "2024-03-02T07:15:17+00:00"
},
{
"name": "sebastian/environment",
- "version": "5.1.5",
+ "version": "6.1.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed"
+ "reference": "8074dbcd93529b357029f5cc5058fd3e43666984"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed",
- "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984",
+ "reference": "8074dbcd93529b357029f5cc5058fd3e43666984",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"suggest": {
"ext-posix": "*"
@@ -12712,7 +12719,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.1-dev"
+ "dev-main": "6.1-dev"
}
},
"autoload": {
@@ -12731,7 +12738,7 @@
}
],
"description": "Provides functionality to handle HHVM/PHP environments",
- "homepage": "http://www.github.com/sebastianbergmann/environment",
+ "homepage": "https://github.com/sebastianbergmann/environment",
"keywords": [
"Xdebug",
"environment",
@@ -12739,7 +12746,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/environment/issues",
- "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5"
+ "security": "https://github.com/sebastianbergmann/environment/security/policy",
+ "source": "https://github.com/sebastianbergmann/environment/tree/6.1.0"
},
"funding": [
{
@@ -12747,34 +12755,34 @@
"type": "github"
}
],
- "time": "2023-02-03T06:03:51+00:00"
+ "time": "2024-03-23T08:47:14+00:00"
},
{
"name": "sebastian/exporter",
- "version": "4.0.6",
+ "version": "5.1.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72"
+ "reference": "955288482d97c19a372d3f31006ab3f37da47adf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72",
- "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/955288482d97c19a372d3f31006ab3f37da47adf",
+ "reference": "955288482d97c19a372d3f31006ab3f37da47adf",
"shasum": ""
},
"require": {
- "php": ">=7.3",
- "sebastian/recursion-context": "^4.0"
+ "ext-mbstring": "*",
+ "php": ">=8.1",
+ "sebastian/recursion-context": "^5.0"
},
"require-dev": {
- "ext-mbstring": "*",
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0-dev"
+ "dev-main": "5.1-dev"
}
},
"autoload": {
@@ -12816,7 +12824,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues",
- "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6"
+ "security": "https://github.com/sebastianbergmann/exporter/security/policy",
+ "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.2"
},
"funding": [
{
@@ -12824,38 +12833,35 @@
"type": "github"
}
],
- "time": "2024-03-02T06:33:00+00:00"
+ "time": "2024-03-02T07:17:12+00:00"
},
{
"name": "sebastian/global-state",
- "version": "5.0.7",
+ "version": "6.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9"
+ "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9",
- "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9",
+ "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9",
"shasum": ""
},
"require": {
- "php": ">=7.3",
- "sebastian/object-reflector": "^2.0",
- "sebastian/recursion-context": "^4.0"
+ "php": ">=8.1",
+ "sebastian/object-reflector": "^3.0",
+ "sebastian/recursion-context": "^5.0"
},
"require-dev": {
"ext-dom": "*",
- "phpunit/phpunit": "^9.3"
- },
- "suggest": {
- "ext-uopz": "*"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.0-dev"
+ "dev-main": "6.0-dev"
}
},
"autoload": {
@@ -12874,13 +12880,14 @@
}
],
"description": "Snapshotting of global state",
- "homepage": "http://www.github.com/sebastianbergmann/global-state",
+ "homepage": "https://www.github.com/sebastianbergmann/global-state",
"keywords": [
"global state"
],
"support": {
"issues": "https://github.com/sebastianbergmann/global-state/issues",
- "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7"
+ "security": "https://github.com/sebastianbergmann/global-state/security/policy",
+ "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.2"
},
"funding": [
{
@@ -12888,33 +12895,33 @@
"type": "github"
}
],
- "time": "2024-03-02T06:35:11+00:00"
+ "time": "2024-03-02T07:19:19+00:00"
},
{
"name": "sebastian/lines-of-code",
- "version": "1.0.4",
+ "version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/lines-of-code.git",
- "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5"
+ "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5",
- "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5",
+ "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0",
+ "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0",
"shasum": ""
},
"require": {
"nikic/php-parser": "^4.18 || ^5.0",
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0-dev"
+ "dev-main": "2.0-dev"
}
},
"autoload": {
@@ -12937,7 +12944,8 @@
"homepage": "https://github.com/sebastianbergmann/lines-of-code",
"support": {
"issues": "https://github.com/sebastianbergmann/lines-of-code/issues",
- "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4"
+ "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy",
+ "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.2"
},
"funding": [
{
@@ -12945,34 +12953,34 @@
"type": "github"
}
],
- "time": "2023-12-22T06:20:34+00:00"
+ "time": "2023-12-21T08:38:20+00:00"
},
{
"name": "sebastian/object-enumerator",
- "version": "4.0.4",
+ "version": "5.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
- "reference": "5c9eeac41b290a3712d88851518825ad78f45c71"
+ "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71",
- "reference": "5c9eeac41b290a3712d88851518825ad78f45c71",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906",
+ "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906",
"shasum": ""
},
"require": {
- "php": ">=7.3",
- "sebastian/object-reflector": "^2.0",
- "sebastian/recursion-context": "^4.0"
+ "php": ">=8.1",
+ "sebastian/object-reflector": "^3.0",
+ "sebastian/recursion-context": "^5.0"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0-dev"
+ "dev-main": "5.0-dev"
}
},
"autoload": {
@@ -12994,7 +13002,7 @@
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
"support": {
"issues": "https://github.com/sebastianbergmann/object-enumerator/issues",
- "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4"
+ "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0"
},
"funding": [
{
@@ -13002,32 +13010,32 @@
"type": "github"
}
],
- "time": "2020-10-26T13:12:34+00:00"
+ "time": "2023-02-03T07:08:32+00:00"
},
{
"name": "sebastian/object-reflector",
- "version": "2.0.4",
+ "version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-reflector.git",
- "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7"
+ "reference": "24ed13d98130f0e7122df55d06c5c4942a577957"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
- "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957",
+ "reference": "24ed13d98130f0e7122df55d06c5c4942a577957",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-main": "3.0-dev"
}
},
"autoload": {
@@ -13049,7 +13057,7 @@
"homepage": "https://github.com/sebastianbergmann/object-reflector/",
"support": {
"issues": "https://github.com/sebastianbergmann/object-reflector/issues",
- "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4"
+ "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0"
},
"funding": [
{
@@ -13057,32 +13065,32 @@
"type": "github"
}
],
- "time": "2020-10-26T13:14:26+00:00"
+ "time": "2023-02-03T07:06:18+00:00"
},
{
"name": "sebastian/recursion-context",
- "version": "4.0.5",
+ "version": "5.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1"
+ "reference": "05909fb5bc7df4c52992396d0116aed689f93712"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1",
- "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712",
+ "reference": "05909fb5bc7df4c52992396d0116aed689f93712",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0-dev"
+ "dev-main": "5.0-dev"
}
},
"autoload": {
@@ -13112,7 +13120,7 @@
"homepage": "https://github.com/sebastianbergmann/recursion-context",
"support": {
"issues": "https://github.com/sebastianbergmann/recursion-context/issues",
- "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5"
+ "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0"
},
"funding": [
{
@@ -13120,86 +13128,32 @@
"type": "github"
}
],
- "time": "2023-02-03T06:07:39+00:00"
- },
- {
- "name": "sebastian/resource-operations",
- "version": "3.0.4",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/resource-operations.git",
- "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e",
- "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e",
- "shasum": ""
- },
- "require": {
- "php": ">=7.3"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "3.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "description": "Provides a list of PHP built-in functions that operate on resources",
- "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
- "support": {
- "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2024-03-14T16:00:52+00:00"
+ "time": "2023-02-03T07:05:40+00:00"
},
{
"name": "sebastian/type",
- "version": "3.2.1",
+ "version": "4.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
- "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7"
+ "reference": "462699a16464c3944eefc02ebdd77882bd3925bf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7",
- "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7",
+ "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf",
+ "reference": "462699a16464c3944eefc02ebdd77882bd3925bf",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.5"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-main": "4.0-dev"
}
},
"autoload": {
@@ -13222,7 +13176,7 @@
"homepage": "https://github.com/sebastianbergmann/type",
"support": {
"issues": "https://github.com/sebastianbergmann/type/issues",
- "source": "https://github.com/sebastianbergmann/type/tree/3.2.1"
+ "source": "https://github.com/sebastianbergmann/type/tree/4.0.0"
},
"funding": [
{
@@ -13230,29 +13184,29 @@
"type": "github"
}
],
- "time": "2023-02-03T06:13:03+00:00"
+ "time": "2023-02-03T07:10:45+00:00"
},
{
"name": "sebastian/version",
- "version": "3.0.2",
+ "version": "4.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/version.git",
- "reference": "c6c1022351a901512170118436c764e473f6de8c"
+ "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c",
- "reference": "c6c1022351a901512170118436c764e473f6de8c",
+ "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17",
+ "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.0-dev"
+ "dev-main": "4.0-dev"
}
},
"autoload": {
@@ -13275,7 +13229,7 @@
"homepage": "https://github.com/sebastianbergmann/version",
"support": {
"issues": "https://github.com/sebastianbergmann/version/issues",
- "source": "https://github.com/sebastianbergmann/version/tree/3.0.2"
+ "source": "https://github.com/sebastianbergmann/version/tree/4.0.1"
},
"funding": [
{
@@ -13283,7 +13237,7 @@
"type": "github"
}
],
- "time": "2020-09-28T06:39:44+00:00"
+ "time": "2023-02-07T11:34:05+00:00"
},
{
"name": "symfony/browser-kit",
diff --git a/phpstan.neon b/phpstan.neon
index de92cf96..c494538a 100644
--- a/phpstan.neon
+++ b/phpstan.neon
@@ -3657,11 +3657,6 @@ parameters:
count: 2
path: src/Project/ProjectStatisticService.php
- -
- message: "#^Parameter \\#1 \\$year of method App\\\\Reporting\\\\ProjectDetails\\\\ProjectDetailsModel\\:\\:addYearActivity\\(\\) expects string, int\\|string given\\.$#"
- count: 1
- path: src/Project/ProjectStatisticService.php
-
-
message: "#^Parameter \\#2 \\$statistic of class App\\\\Event\\\\ProjectStatisticEvent constructor expects App\\\\Model\\\\ProjectStatistic, App\\\\Model\\\\ProjectStatistic\\|null given\\.$#"
count: 1
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 1bcec170..49cbd673 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -1,73 +1,67 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- tests/
-
-
-
-
-
- src/
- templates/
-
-
- migrations/
- assets/
- bin/
- config/
- node_modules/
- public/
- tests/
- translations/
- var/
- vendor/
-
-
-
+ bootstrap="tests/bootstrap.php"
+ cacheDirectory="var/cache/phpunit/">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+ REINSTALL THE TEST DATABASE, eg. AFTER CHANGING STRUCTURE!
+
+ - change to "true"
+ - composer tests
+ - change back to "false"
+
+ CREATE DATABASE IF NOT EXISTS `kimai2_test`;
+ CREATE USER IF NOT EXISTS `kimai2_test`@127.0.0.1;
+ ALTER USER `kimai2_test`@127.0.0.1 IDENTIFIED BY "kimai2_test";
+ GRANT execute,select,insert,update,delete,create,alter,drop,index,references ON `kimai2_test`.* TO kimai2_test@127.0.0.1;
+ -->
+
+
+
+
+
+ tests/
+
+
+
+
+
+ src/
+ templates/
+
+
+ migrations/
+ assets/
+ bin/
+ config/
+ node_modules/
+ public/
+ tests/
+ translations/
+ var/
+ vendor/
+
+
+
+
+
+
-
-
-
diff --git a/src/WorkingTime/WorkingTimeService.php b/src/WorkingTime/WorkingTimeService.php
index 11c3044a..e6600271 100644
--- a/src/WorkingTime/WorkingTimeService.php
+++ b/src/WorkingTime/WorkingTimeService.php
@@ -242,6 +242,6 @@ final class WorkingTimeService
$durations[$row['day']] = (int) $row['duration'];
}
- return $durations; // @phpstan-ignore-line
+ return $durations;
}
}
diff --git a/symfony.lock b/symfony.lock
index a29bd6b1..5645c1ab 100644
--- a/symfony.lock
+++ b/symfony.lock
@@ -334,9 +334,6 @@
"sebastian/recursion-context": {
"version": "3.0.0"
},
- "sebastian/resource-operations": {
- "version": "1.0.0"
- },
"sebastian/type": {
"version": "1.1.3"
},
diff --git a/tests/API/APIControllerBaseTest.php b/tests/API/APIControllerBaseTestCase.php
similarity index 97%
rename from tests/API/APIControllerBaseTest.php
rename to tests/API/APIControllerBaseTestCase.php
index d29b83f6..8312f53e 100644
--- a/tests/API/APIControllerBaseTest.php
+++ b/tests/API/APIControllerBaseTestCase.php
@@ -11,7 +11,7 @@ namespace App\Tests\API;
use App\DataFixtures\UserFixtures;
use App\Entity\User;
-use App\Tests\Controller\ControllerBaseTest;
+use App\Tests\Controller\AbstractControllerBaseTestCase;
use PHPUnit\Framework\Constraint\IsType;
use Symfony\Component\DomCrawler\Crawler;
use Symfony\Component\HttpFoundation\Response;
@@ -20,7 +20,7 @@ use Symfony\Component\HttpKernel\HttpKernelBrowser;
/**
* Adds some useful functions for writing API integration tests.
*/
-abstract class APIControllerBaseTest extends ControllerBaseTest
+abstract class APIControllerBaseTestCase extends AbstractControllerBaseTestCase
{
/**
* @return array
@@ -50,15 +50,15 @@ abstract class APIControllerBaseTest extends ControllerBaseTest
protected function assertPagination(Response $response, int $page, int $pageSize, int $totalPages, int $totalResults): void
{
- $this->assertTrue($response->headers->has('X-Page'), 'Missing "X-Page" header');
- $this->assertTrue($response->headers->has('X-Total-Count'), 'Missing "X-Total-Count" header');
- $this->assertTrue($response->headers->has('X-Total-Pages'), 'Missing "X-Total-Pages" header');
- $this->assertTrue($response->headers->has('X-Per-Page'), 'Missing "X-Per-Page" header');
+ self::assertTrue($response->headers->has('X-Page'), 'Missing "X-Page" header');
+ self::assertTrue($response->headers->has('X-Total-Count'), 'Missing "X-Total-Count" header');
+ self::assertTrue($response->headers->has('X-Total-Pages'), 'Missing "X-Total-Pages" header');
+ self::assertTrue($response->headers->has('X-Per-Page'), 'Missing "X-Per-Page" header');
- $this->assertEquals($page, $response->headers->get('X-Page'));
- $this->assertEquals($totalResults, $response->headers->get('X-Total-Count'));
- $this->assertEquals($totalPages, $response->headers->get('X-Total-Pages'));
- $this->assertEquals($pageSize, $response->headers->get('X-Per-Page'));
+ self::assertEquals($page, $response->headers->get('X-Page'));
+ self::assertEquals($totalResults, $response->headers->get('X-Total-Count'));
+ self::assertEquals($totalPages, $response->headers->get('X-Total-Pages'));
+ self::assertEquals($pageSize, $response->headers->get('X-Per-Page'));
}
protected function assertRequestIsSecured(HttpKernelBrowser $client, string $url, string $method = 'GET'): void
@@ -242,7 +242,7 @@ abstract class APIControllerBaseTest extends ControllerBaseTest
if (\count($expectedFields) > 0) {
foreach ($expectedFields as $expectedField) {
- $this->assertArrayHasKey($expectedField, $data, 'Expected field is missing: ' . $expectedField);
+ self::assertArrayHasKey($expectedField, $data, 'Expected field is missing: ' . $expectedField);
}
}
diff --git a/tests/API/ActionsControllerTest.php b/tests/API/ActionsControllerTest.php
index ac01542d..805d4ec9 100644
--- a/tests/API/ActionsControllerTest.php
+++ b/tests/API/ActionsControllerTest.php
@@ -18,7 +18,7 @@ use App\Tests\DataFixtures\TimesheetFixtures;
/**
* @group integration
*/
-class ActionsControllerTest extends APIControllerBaseTest
+class ActionsControllerTest extends APIControllerBaseTestCase
{
public function testIsSecure(): void
{
@@ -58,7 +58,7 @@ class ActionsControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, \sprintf('/api/actions/timesheet/%s/%s/en', $items[0]->getId(), $view));
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
foreach ($result as $item) {
self::assertIsArray($item);
self::assertApiResponseTypeStructure('PageActionItem', $item);
@@ -110,7 +110,7 @@ class ActionsControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, \sprintf('/api/actions/activity/%s/%s/en', $activities[0]->getId(), $view));
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
foreach ($result as $item) {
self::assertIsArray($item);
self::assertApiResponseTypeStructure('PageActionItem', $item);
@@ -161,7 +161,7 @@ class ActionsControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, \sprintf('/api/actions/project/%s/%s/en', $projects[0]->getId(), $view));
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
foreach ($result as $item) {
self::assertIsArray($item);
self::assertApiResponseTypeStructure('PageActionItem', $item);
@@ -208,7 +208,7 @@ class ActionsControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, \sprintf('/api/actions/customer/%s/%s/en', $customers[0]->getId(), $view));
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
foreach ($result as $item) {
self::assertIsArray($item);
self::assertApiResponseTypeStructure('PageActionItem', $item);
diff --git a/tests/API/ActivityControllerTest.php b/tests/API/ActivityControllerTest.php
index d8e8b330..e1b210b3 100644
--- a/tests/API/ActivityControllerTest.php
+++ b/tests/API/ActivityControllerTest.php
@@ -28,7 +28,7 @@ use Symfony\Component\HttpFoundation\Response;
/**
* @group integration
*/
-class ActivityControllerTest extends APIControllerBaseTest
+class ActivityControllerTest extends APIControllerBaseTestCase
{
use RateControllerTestTrait;
@@ -173,19 +173,19 @@ class ActivityControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, $url, 'GET', $parameters);
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
- $this->assertNotEmpty($result);
- $this->assertEquals(\count($expected), \count($result));
+ self::assertIsArray($result);
+ self::assertNotEmpty($result);
+ self::assertEquals(\count($expected), \count($result));
for ($i = 0; $i < \count($result); $i++) {
$activity = $result[$i];
$hasProject = $expected[$i][0];
self::assertIsArray($activity);
self::assertApiResponseTypeStructure('ActivityCollection', $activity);
if ($hasProject && $projectId !== null) {
- $this->assertEquals($projectId, $activity['project']);
+ self::assertEquals($projectId, $activity['project']);
}
}
}
@@ -193,7 +193,7 @@ class ActivityControllerTest extends APIControllerBaseTest
/**
* @return \Generator>
*/
- public function getCollectionTestData(): iterable
+ public static function getCollectionTestData(): iterable
{
yield ['/api/activities', null, [], [[false], [true, 2], [true, 2], [null], [true, 1]]];
//yield ['/api/activities', [], [[false], [false], [true, 2], [true, 1], [true, 2]]];
@@ -217,17 +217,17 @@ class ActivityControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/activities', 'GET', $query);
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
- $this->assertNotEmpty($result);
- $this->assertEquals(5, \count($result));
+ self::assertIsArray($result);
+ self::assertNotEmpty($result);
+ self::assertEquals(5, \count($result));
self::assertIsArray($result[0]);
self::assertApiResponseTypeStructure('ActivityCollection', $result[0]);
- $this->assertEquals($imports[0]->getId(), $result[4]['project']);
- $this->assertEquals($imports[1]->getId(), $result[3]['project']);
- $this->assertEquals($imports[1]->getId(), $result[2]['project']);
+ self::assertEquals($imports[0]->getId(), $result[4]['project']);
+ self::assertEquals($imports[1]->getId(), $result[3]['project']);
+ self::assertEquals($imports[1]->getId(), $result[2]['project']);
}
public function testGetEntityIsSecure(): void
@@ -241,10 +241,10 @@ class ActivityControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/activities/1');
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('ActivityEntity', $result);
}
@@ -264,15 +264,15 @@ class ActivityControllerTest extends APIControllerBaseTest
'timeBudget' => '7200',
];
$this->request($client, '/api/activities', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('ActivityEntity', $result);
- $this->assertNotEmpty($result['id']);
+ self::assertNotEmpty($result['id']);
}
public function testPostActionWithLeastFields(): void
@@ -282,15 +282,15 @@ class ActivityControllerTest extends APIControllerBaseTest
'name' => 'foo',
];
$this->request($client, '/api/activities', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('ActivityEntity', $result);
- $this->assertNotEmpty($result['id']);
+ self::assertNotEmpty($result['id']);
}
public function testPostActionWithInvalidUser(): void
@@ -331,15 +331,15 @@ class ActivityControllerTest extends APIControllerBaseTest
'timeBudget' => '7200',
];
$this->request($client, '/api/activities/1', 'PATCH', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('ActivityEntity', $result);
- $this->assertNotEmpty($result['id']);
+ self::assertNotEmpty($result['id']);
}
public function testPatchActionWithNonGlobalActivity(): void
@@ -356,16 +356,16 @@ class ActivityControllerTest extends APIControllerBaseTest
'timeBudget' => '7200',
];
$this->request($client, '/api/activities/' . $imports[2]->getId(), 'PATCH', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('ActivityEntity', $result);
- $this->assertNotEmpty($result['id']);
- $this->assertEquals($imports[1]->getId(), $result['project']);
+ self::assertNotEmpty($result['id']);
+ self::assertEquals($imports[1]->getId(), $result['project']);
}
public function testPatchActionWithInvalidUser(): void
@@ -398,7 +398,7 @@ class ActivityControllerTest extends APIControllerBaseTest
$this->request($client, '/api/activities/1', 'PATCH', [], json_encode($data));
$response = $client->getResponse();
- $this->assertEquals(400, $response->getStatusCode());
+ self::assertEquals(400, $response->getStatusCode());
$this->assertApiCallValidationError($response, ['name']);
}
@@ -444,12 +444,12 @@ class ActivityControllerTest extends APIControllerBaseTest
];
$this->request($client, '/api/activities/1/meta', 'PATCH', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$em = $this->getEntityManager();
/** @var Activity $activity */
$activity = $em->getRepository(Activity::class)->find(1);
- $this->assertEquals('another,testing,bar', $activity->getMetaField('metatestmock')->getValue());
+ self::assertEquals('another,testing,bar', $activity->getMetaField('metatestmock')->getValue());
}
// ------------------------------- [DELETE] -------------------------------
@@ -499,9 +499,9 @@ class ActivityControllerTest extends APIControllerBaseTest
$id = $result['id'];
$this->request($client, '/api/activities/' . $id, Request::METHOD_DELETE);
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
self::assertEquals(Response::HTTP_NO_CONTENT, $client->getResponse()->getStatusCode());
- $this->assertEmpty($client->getResponse()->getContent());
+ self::assertEmpty($client->getResponse()->getContent());
$this->request($client, $getUrl);
$this->assertApiException($client->getResponse(), [
diff --git a/tests/API/ApiDocControllerTest.php b/tests/API/ApiDocControllerTest.php
index c236e3c0..3afd7821 100644
--- a/tests/API/ApiDocControllerTest.php
+++ b/tests/API/ApiDocControllerTest.php
@@ -10,12 +10,12 @@
namespace App\Tests\API;
use App\Entity\User;
-use App\Tests\Controller\ControllerBaseTest;
+use App\Tests\Controller\AbstractControllerBaseTestCase;
/**
* @group integration
*/
-class ApiDocControllerTest extends ControllerBaseTest
+class ApiDocControllerTest extends AbstractControllerBaseTestCase
{
public function testIsSecure(): void
{
@@ -26,7 +26,7 @@ class ApiDocControllerTest extends ControllerBaseTest
{
$client = $this->getClientForAuthenticatedUser(User::ROLE_USER);
$this->assertAccessIsGranted($client, '/api/doc');
- $this->assertStringContainsString('Kimai', $client->getResponse()->getContent());
+ self::assertStringContainsString('Kimai', $client->getResponse()->getContent());
$result = $client->getCrawler()->filter('script#swagger-data');
$swaggerJson = json_decode($result->text(), true);
$tags = [];
@@ -104,25 +104,25 @@ class ApiDocControllerTest extends ControllerBaseTest
'/api/users/api-token/{id}',
];
- $this->assertArrayHasKey('openapi', $json);
- $this->assertEquals('3.0.0', $json['openapi']);
- $this->assertArrayHasKey('info', $json);
- $this->assertStringStartsWith('Kimai', $json['info']['title']);
- $this->assertEquals('1.0', $json['info']['version']);
+ self::assertArrayHasKey('openapi', $json);
+ self::assertEquals('3.0.0', $json['openapi']);
+ self::assertArrayHasKey('info', $json);
+ self::assertStringStartsWith('Kimai', $json['info']['title']);
+ self::assertEquals('1.0', $json['info']['version']);
- $this->assertArrayHasKey('paths', $json);
- $this->assertEquals($paths, array_keys($json['paths']));
+ self::assertArrayHasKey('paths', $json);
+ self::assertEquals($paths, array_keys($json['paths']));
- $this->assertArrayHasKey('security', $json);
- $this->assertEquals(['bearer' => []], $json['security'][0]);
+ self::assertArrayHasKey('security', $json);
+ self::assertEquals(['bearer' => []], $json['security'][0]);
- $this->assertArrayHasKey('components', $json);
- $this->assertArrayHasKey('schemas', $json['components']);
- $this->assertArrayHasKey('securitySchemes', $json['components']);
+ self::assertArrayHasKey('components', $json);
+ self::assertArrayHasKey('schemas', $json['components']);
+ self::assertArrayHasKey('securitySchemes', $json['components']);
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertNotEmpty($result);
+ self::assertIsArray($result);
+ self::assertNotEmpty($result);
}
protected function createUrl(string $url): string
diff --git a/tests/API/Authentication/AccessTokenHandlerTest.php b/tests/API/Authentication/AccessTokenHandlerTest.php
index 7711d422..c065bbf5 100644
--- a/tests/API/Authentication/AccessTokenHandlerTest.php
+++ b/tests/API/Authentication/AccessTokenHandlerTest.php
@@ -55,11 +55,11 @@ class AccessTokenHandlerTest extends TestCase
$user = new User();
$user->setUserIdentifier('foo-bar');
$accessToken = new AccessToken($user, 'Test');
- $this->assertNull($accessToken->getLastUsage());
+ self::assertNull($accessToken->getLastUsage());
$sut = $this->getSut($accessToken);
$badge = $sut->getUserBadgeFrom('foo');
- $this->assertNotNull($accessToken->getLastUsage());
- $this->assertSame('foo-bar', $badge->getUserIdentifier());
+ self::assertNotNull($accessToken->getLastUsage());
+ self::assertSame('foo-bar', $badge->getUserIdentifier());
}
}
diff --git a/tests/API/AuthenticationTest.php b/tests/API/AuthenticationTest.php
index 381added..8cb2150f 100644
--- a/tests/API/AuthenticationTest.php
+++ b/tests/API/AuthenticationTest.php
@@ -19,7 +19,7 @@ use Symfony\Component\HttpFoundation\Response;
* @group legacy
* @group integration
*/
-class AuthenticationTest extends APIControllerBaseTest
+class AuthenticationTest extends APIControllerBaseTestCase
{
public function testPinIsSecure(): void
{
@@ -31,11 +31,11 @@ class AuthenticationTest extends APIControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_USER);
$this->assertAccessIsGranted($client, '/api/ping');
$response = $client->getResponse()->getContent();
- $this->assertIsString($response);
+ self::assertIsString($response);
$result = json_decode($response, true);
- $this->assertIsArray($result);
- $this->assertEquals(['message' => 'pong'], $result);
+ self::assertIsArray($result);
+ self::assertEquals(['message' => 'pong'], $result);
}
public function testPingWithAuthTokenAndUsername(): void
@@ -44,11 +44,11 @@ class AuthenticationTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/ping');
$response = $client->getResponse()->getContent();
- $this->assertIsString($response);
+ self::assertIsString($response);
$result = json_decode($response, true);
- $this->assertIsArray($result);
- $this->assertEquals(['message' => 'pong'], $result);
+ self::assertIsArray($result);
+ self::assertEquals(['message' => 'pong'], $result);
}
public function testPingWithInvalidAuthTokenAndUsername(): void
@@ -64,15 +64,15 @@ class AuthenticationTest extends APIControllerBaseTest
'message' => 'Invalid credentials',
];
- $this->assertIsString($response->getContent());
+ self::assertIsString($response->getContent());
- $this->assertEquals(
+ self::assertEquals(
$data,
json_decode($response->getContent(), true),
\sprintf('The secure URL %s is not protected.', $url)
);
- $this->assertEquals(
+ self::assertEquals(
Response::HTTP_FORBIDDEN,
$response->getStatusCode(),
\sprintf('The secure URL %s has the wrong status code %s.', $url, $response->getStatusCode())
diff --git a/tests/API/ConfigurationControllerTest.php b/tests/API/ConfigurationControllerTest.php
index f852a654..7ecb9d45 100644
--- a/tests/API/ConfigurationControllerTest.php
+++ b/tests/API/ConfigurationControllerTest.php
@@ -14,7 +14,7 @@ use App\Entity\User;
/**
* @group integration
*/
-class ConfigurationControllerTest extends APIControllerBaseTest
+class ConfigurationControllerTest extends APIControllerBaseTestCase
{
public function testIsTimesheetSecure(): void
{
@@ -26,18 +26,18 @@ class ConfigurationControllerTest extends APIControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_USER);
$this->assertAccessIsGranted($client, '/api/config/timesheet', 'GET');
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
- $this->assertNotEmpty($result);
+ self::assertIsArray($result);
+ self::assertNotEmpty($result);
$expectedKeys = ['activeEntriesHardLimit', 'defaultBeginTime', 'isAllowFutureTimes', 'isAllowOverlapping', 'trackingMode'];
- $this->assertCount(\count($expectedKeys), $result);
+ self::assertCount(\count($expectedKeys), $result);
$actual = array_keys($result);
sort($actual);
sort($expectedKeys);
- $this->assertEquals($expectedKeys, $actual, 'Config structure does not match');
+ self::assertEquals($expectedKeys, $actual, 'Config structure does not match');
}
public function testIsColorsSecure(): void
@@ -50,11 +50,11 @@ class ConfigurationControllerTest extends APIControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_USER);
$this->assertAccessIsGranted($client, '/api/config/colors', 'GET');
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$actual = json_decode($content, true);
- $this->assertIsArray($actual);
- $this->assertNotEmpty($actual);
+ self::assertIsArray($actual);
+ self::assertNotEmpty($actual);
$expected = [
'Silver' => '#c0c0c0',
'Gray' => '#808080',
@@ -84,8 +84,8 @@ class ConfigurationControllerTest extends APIControllerBaseTest
'Rose' => '#ffe4e1',
'Lavender' => '#E6E6FA',
];
- $this->assertCount(\count($expected), $actual);
+ self::assertCount(\count($expected), $actual);
- $this->assertEquals($expected, $actual, 'Color structure does not match');
+ self::assertEquals($expected, $actual, 'Color structure does not match');
}
}
diff --git a/tests/API/CustomerControllerTest.php b/tests/API/CustomerControllerTest.php
index 01a56978..2702934e 100644
--- a/tests/API/CustomerControllerTest.php
+++ b/tests/API/CustomerControllerTest.php
@@ -28,7 +28,7 @@ use Symfony\Component\HttpFoundation\Response;
/**
* @group integration
*/
-class CustomerControllerTest extends APIControllerBaseTest
+class CustomerControllerTest extends APIControllerBaseTestCase
{
use RateControllerTestTrait;
@@ -140,12 +140,12 @@ class CustomerControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/customers');
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
- $this->assertNotEmpty($result);
- $this->assertEquals(1, \count($result));
+ self::assertIsArray($result);
+ self::assertNotEmpty($result);
+ self::assertEquals(1, \count($result));
self::assertIsArray($result[0]);
self::assertApiResponseTypeStructure('CustomerCollection', $result[0]);
}
@@ -157,12 +157,12 @@ class CustomerControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/customers', 'GET', $query);
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
- $this->assertNotEmpty($result);
- $this->assertEquals(1, \count($result));
+ self::assertIsArray($result);
+ self::assertNotEmpty($result);
+ self::assertEquals(1, \count($result));
self::assertIsArray($result[0]);
self::assertApiResponseTypeStructure('CustomerCollection', $result[0]);
}
@@ -178,10 +178,10 @@ class CustomerControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/customers/1');
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('CustomerEntity', $result);
}
@@ -225,10 +225,10 @@ class CustomerControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/customers/1');
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('CustomerEntity', $result);
}
@@ -250,15 +250,15 @@ class CustomerControllerTest extends APIControllerBaseTest
'timeBudget' => '7200',
];
$this->request($client, '/api/customers', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('CustomerEntity', $result);
- $this->assertNotEmpty($result['id']);
+ self::assertNotEmpty($result['id']);
}
public function testPostActionWithLeastFields(): void
@@ -271,15 +271,15 @@ class CustomerControllerTest extends APIControllerBaseTest
'timezone' => 'Europe/Berlin',
];
$this->request($client, '/api/customers', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('CustomerEntity', $result);
- $this->assertNotEmpty($result['id']);
+ self::assertNotEmpty($result['id']);
}
public function testPostActionWithInvalidUser(): void
@@ -327,15 +327,15 @@ class CustomerControllerTest extends APIControllerBaseTest
'timeBudget' => '7200',
];
$this->request($client, '/api/customers/1', 'PATCH', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('CustomerEntity', $result);
- $this->assertNotEmpty($result['id']);
+ self::assertNotEmpty($result['id']);
}
public function testPatchActionWithInvalidUser(): void
@@ -373,7 +373,7 @@ class CustomerControllerTest extends APIControllerBaseTest
$this->request($client, '/api/customers/1', 'PATCH', [], json_encode($data));
$response = $client->getResponse();
- $this->assertEquals(400, $response->getStatusCode());
+ self::assertEquals(400, $response->getStatusCode());
$this->assertApiCallValidationError($response, ['currency']);
}
@@ -426,12 +426,12 @@ class CustomerControllerTest extends APIControllerBaseTest
];
$this->request($client, '/api/customers/1/meta', 'PATCH', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$em = $this->getEntityManager();
/** @var Customer $customer */
$customer = $em->getRepository(Customer::class)->find(1);
- $this->assertEquals('another,testing,bar', $customer->getMetaField('metatestmock')->getValue());
+ self::assertEquals('another,testing,bar', $customer->getMetaField('metatestmock')->getValue());
}
// ------------------------------- [DELETE] -------------------------------
@@ -481,9 +481,9 @@ class CustomerControllerTest extends APIControllerBaseTest
$id = $result['id'];
$this->request($client, '/api/customers/' . $id, Request::METHOD_DELETE);
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
self::assertEquals(Response::HTTP_NO_CONTENT, $client->getResponse()->getStatusCode());
- $this->assertEmpty($client->getResponse()->getContent());
+ self::assertEmpty($client->getResponse()->getContent());
$this->request($client, $getUrl);
$this->assertApiException($client->getResponse(), [
diff --git a/tests/API/InvoiceControllerTest.php b/tests/API/InvoiceControllerTest.php
index a31ed8bd..d563af0d 100644
--- a/tests/API/InvoiceControllerTest.php
+++ b/tests/API/InvoiceControllerTest.php
@@ -16,7 +16,7 @@ use App\Tests\DataFixtures\InvoiceFixtures;
/**
* @group integration
*/
-class InvoiceControllerTest extends APIControllerBaseTest
+class InvoiceControllerTest extends APIControllerBaseTestCase
{
/**
* @return Invoice[]
@@ -45,12 +45,12 @@ class InvoiceControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/invoices');
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
- $this->assertNotEmpty($result);
- $this->assertEquals(10, \count($result));
+ self::assertIsArray($result);
+ self::assertNotEmpty($result);
+ self::assertEquals(10, \count($result));
self::assertIsArray($result[0]);
self::assertApiResponseTypeStructure('InvoiceCollection', $result[0]);
}
@@ -67,12 +67,12 @@ class InvoiceControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/invoices', 'GET', $query);
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
- $this->assertNotEmpty($result);
- $this->assertEquals(7, \count($result));
+ self::assertIsArray($result);
+ self::assertNotEmpty($result);
+ self::assertEquals(7, \count($result));
self::assertIsArray($result[0]);
self::assertApiResponseTypeStructure('InvoiceCollection', $result[0]);
}
@@ -86,12 +86,12 @@ class InvoiceControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/invoices', 'GET', $query);
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
- $this->assertNotEmpty($result);
- $this->assertEquals(4, \count($result));
+ self::assertIsArray($result);
+ self::assertNotEmpty($result);
+ self::assertEquals(4, \count($result));
$this->assertPagination($client->getResponse(), 2, 4, 5, 20);
self::assertIsArray($result[0]);
self::assertApiResponseTypeStructure('InvoiceCollection', $result[0]);
@@ -113,10 +113,10 @@ class InvoiceControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/invoices/' . $invoices[0]->getId());
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('Invoice', $result);
}
diff --git a/tests/API/ProjectControllerTest.php b/tests/API/ProjectControllerTest.php
index b51814dd..94ae2223 100644
--- a/tests/API/ProjectControllerTest.php
+++ b/tests/API/ProjectControllerTest.php
@@ -28,7 +28,7 @@ use Symfony\Component\HttpFoundation\Response;
/**
* @group integration
*/
-class ProjectControllerTest extends APIControllerBaseTest
+class ProjectControllerTest extends APIControllerBaseTestCase
{
use RateControllerTestTrait;
@@ -101,12 +101,12 @@ class ProjectControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/projects');
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
- $this->assertNotEmpty($result);
- $this->assertEquals(1, \count($result));
+ self::assertIsArray($result);
+ self::assertNotEmpty($result);
+ self::assertEquals(1, \count($result));
self::assertIsArray($result[0]);
self::assertApiResponseTypeStructure('ProjectCollection', $result[0]);
}
@@ -224,18 +224,18 @@ class ProjectControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, $url, 'GET', $parameters);
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
- $this->assertEquals(\count($expected), \count($result), 'Found wrong amount of projects');
+ self::assertIsArray($result);
+ self::assertEquals(\count($expected), \count($result), 'Found wrong amount of projects');
for ($i = 0; $i < \count($expected); $i++) {
$project = $result[$i];
self::assertIsArray($project);
self::assertApiResponseTypeStructure('ProjectCollection', $project);
if ($customerId !== null) {
- $this->assertEquals($customerId, $project['customer']);
+ self::assertEquals($customerId, $project['customer']);
}
}
}
@@ -243,7 +243,7 @@ class ProjectControllerTest extends APIControllerBaseTest
/**
* @return \Generator>
*/
- public function getCollectionTestData(): iterable
+ public static function getCollectionTestData(): iterable
{
// if you wonder why: case-sensitive ordering feels strange ... "Title" > "fifth”
yield ['/api/projects', null, [], [[true, 1], [false, 1], [false, 3]]];
@@ -273,10 +273,10 @@ class ProjectControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/projects/1');
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('ProjectEntity', $result);
}
@@ -308,10 +308,10 @@ class ProjectControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/projects/' . $project->getId());
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('ProjectEntity', $result);
$expected = [
@@ -357,15 +357,15 @@ class ProjectControllerTest extends APIControllerBaseTest
'orderNumber' => '1234567890/WXYZ/SUBPROJECT/1234/CONTRACT/EMPLOYEE1',
];
$this->request($client, '/api/projects', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('ProjectEntity', $result);
- $this->assertNotEmpty($result['id']);
+ self::assertNotEmpty($result['id']);
self::assertEquals('2018-04-17', $result['orderDate']);
self::assertEquals('2019-02-01', $result['start']);
self::assertEquals('2020-02-08', $result['end']);
@@ -386,15 +386,15 @@ class ProjectControllerTest extends APIControllerBaseTest
'visible' => '',
];
$this->request($client, '/api/projects', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('ProjectEntity', $result);
- $this->assertNotEmpty($result['id']);
+ self::assertNotEmpty($result['id']);
self::assertEquals('foo', $result['name']);
self::assertTrue($result['globalActivities']);
self::assertTrue($result['billable']);
@@ -412,15 +412,15 @@ class ProjectControllerTest extends APIControllerBaseTest
'visible' => false,
];
$this->request($client, '/api/projects', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('ProjectEntity', $result);
- $this->assertNotEmpty($result['id']);
+ self::assertNotEmpty($result['id']);
self::assertEquals('foo', $result['name']);
self::assertFalse($result['globalActivities']);
self::assertFalse($result['billable']);
@@ -438,15 +438,15 @@ class ProjectControllerTest extends APIControllerBaseTest
'visible' => true,
];
$this->request($client, '/api/projects', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('ProjectEntity', $result);
- $this->assertNotEmpty($result['id']);
+ self::assertNotEmpty($result['id']);
self::assertEquals('foo', $result['name']);
self::assertTrue($result['globalActivities']);
self::assertTrue($result['billable']);
@@ -461,15 +461,15 @@ class ProjectControllerTest extends APIControllerBaseTest
'customer' => 1
];
$this->request($client, '/api/projects', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('ProjectEntity', $result);
- $this->assertNotEmpty($result['id']);
+ self::assertNotEmpty($result['id']);
self::assertEquals('foo', $result['name']);
self::assertFalse($result['globalActivities']);
self::assertFalse($result['billable']);
@@ -515,15 +515,15 @@ class ProjectControllerTest extends APIControllerBaseTest
'timeBudget' => '7200',
];
$this->request($client, '/api/projects/1', 'PATCH', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('ProjectEntity', $result);
- $this->assertNotEmpty($result['id']);
+ self::assertNotEmpty($result['id']);
}
public function testPatchActionWithInvalidUser(): void
@@ -557,7 +557,7 @@ class ProjectControllerTest extends APIControllerBaseTest
$this->request($client, '/api/projects/1', 'PATCH', [], json_encode($data));
$response = $client->getResponse();
- $this->assertEquals(400, $response->getStatusCode());
+ self::assertEquals(400, $response->getStatusCode());
$this->assertApiCallValidationError($response, ['customer']);
}
@@ -603,12 +603,12 @@ class ProjectControllerTest extends APIControllerBaseTest
];
$this->request($client, '/api/projects/1/meta', 'PATCH', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$em = $this->getEntityManager();
/** @var Project $project */
$project = $em->getRepository(Project::class)->find(1);
- $this->assertEquals('another,testing,bar', $project->getMetaField('metatestmock')->getValue());
+ self::assertEquals('another,testing,bar', $project->getMetaField('metatestmock')->getValue());
}
// ------------------------------- [DELETE] -------------------------------
@@ -658,9 +658,9 @@ class ProjectControllerTest extends APIControllerBaseTest
$id = $result['id'];
$this->request($client, '/api/projects/' . $id, Request::METHOD_DELETE);
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
self::assertEquals(Response::HTTP_NO_CONTENT, $client->getResponse()->getStatusCode());
- $this->assertEmpty($client->getResponse()->getContent());
+ self::assertEmpty($client->getResponse()->getContent());
$this->request($client, $getUrl);
$this->assertApiException($client->getResponse(), [
diff --git a/tests/API/RateControllerTestTrait.php b/tests/API/RateControllerTestTrait.php
index 90144342..7c340942 100644
--- a/tests/API/RateControllerTestTrait.php
+++ b/tests/API/RateControllerTestTrait.php
@@ -53,7 +53,7 @@ trait RateControllerTestTrait
$this->request($client, $this->getRateUrl(), 'POST', [], json_encode($data));
$response = $client->getResponse();
- $this->assertEquals(400, $response->getStatusCode());
+ self::assertEquals(400, $response->getStatusCode());
$this->assertApiCallValidationError($response, ['user']);
}
@@ -81,18 +81,18 @@ trait RateControllerTestTrait
'is_fixed' => false
];
$this->request($client, $this->getRateUrl(), 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
$this->assertRateStructure($result, null);
- $this->assertNotEmpty($result['id']);
- $this->assertEquals(12.34, $result['rate']);
- $this->assertEquals(6.66, $result['internalRate']);
- $this->assertFalse($result['isFixed']);
+ self::assertNotEmpty($result['id']);
+ self::assertEquals(12.34, $result['rate']);
+ self::assertEquals(6.66, $result['internalRate']);
+ self::assertFalse($result['isFixed']);
}
public function testAddFixedRateAction(): void
@@ -105,32 +105,32 @@ trait RateControllerTestTrait
'is_fixed' => true
];
$this->request($client, $this->getRateUrl(), 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
$this->assertRateStructure($result, 1);
- $this->assertNotEmpty($result['id']);
- $this->assertEquals(12.34, $result['rate']);
- $this->assertEquals(6.66, $result['internalRate']);
- $this->assertTrue($result['isFixed']);
+ self::assertNotEmpty($result['id']);
+ self::assertEquals(12.34, $result['rate']);
+ self::assertEquals(6.66, $result['internalRate']);
+ self::assertTrue($result['isFixed']);
}
public function testGetRatesEmptyResult(): void
{
$client = $this->getClientForAuthenticatedUser(User::ROLE_ADMIN);
$this->request($client, $this->getRateUrl(1));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
- $this->assertEmpty($result);
+ self::assertIsArray($result);
+ self::assertEmpty($result);
}
public function testGetRates(): void
@@ -139,22 +139,22 @@ trait RateControllerTestTrait
$expectedRates = $this->importTestRates(1);
$this->request($client, $this->getRateUrl(1));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
- $this->assertNotEmpty($result);
- $this->assertEquals(\count($expectedRates), \count($result));
+ self::assertIsArray($result);
+ self::assertNotEmpty($result);
+ self::assertEquals(\count($expectedRates), \count($result));
foreach ($result as $rate) {
- $this->assertIsArray($rate);
+ self::assertIsArray($rate);
if ($rate['user'] === null) {
$this->assertRateStructure($rate);
} else {
- $this->assertIsArray($rate['user']);
+ self::assertIsArray($rate['user']);
$this->assertRateStructure($rate, $rate['user']['id']);
}
}
@@ -176,19 +176,19 @@ trait RateControllerTestTrait
$expectedRates = $this->importTestRates(1);
$this->request($client, $this->getRateUrlByRate($expectedRates[0], false), 'DELETE');
- $this->assertTrue($client->getResponse()->isSuccessful());
- $this->assertEmpty($client->getResponse()->getContent());
+ self::assertTrue($client->getResponse()->isSuccessful());
+ self::assertEmpty($client->getResponse()->getContent());
// fetch rates to validate that one was removed
$this->request($client, $this->getRateUrlByRate($expectedRates[0], true));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
- $this->assertEquals(\count($expectedRates) - 1, \count($result));
+ self::assertIsArray($result);
+ self::assertEquals(\count($expectedRates) - 1, \count($result));
}
public function testDeleteRateEntityNotFound(): void
@@ -234,7 +234,7 @@ trait RateControllerTestTrait
sort($actual);
sort($expectedKeys);
- $this->assertEquals($expectedKeys, $actual, 'Rate structure does not match');
+ self::assertEquals($expectedKeys, $actual, 'Rate structure does not match');
if (null !== $user) {
self::assertIsArray($result['user'], 'Rate user is not an array');
diff --git a/tests/API/StatusControllerTest.php b/tests/API/StatusControllerTest.php
index 7c398168..92c87b72 100644
--- a/tests/API/StatusControllerTest.php
+++ b/tests/API/StatusControllerTest.php
@@ -15,7 +15,7 @@ use App\Entity\User;
/**
* @group integration
*/
-class StatusControllerTest extends APIControllerBaseTest
+class StatusControllerTest extends APIControllerBaseTestCase
{
public function testIsSecurePing(): void
{
@@ -38,8 +38,8 @@ class StatusControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/ping');
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertEquals(['message' => 'pong'], $result);
+ self::assertIsArray($result);
+ self::assertEquals(['message' => 'pong'], $result);
}
public function testVersion(): void
@@ -48,15 +48,15 @@ class StatusControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/version');
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
- $this->assertArrayHasKey('version', $result);
- $this->assertArrayHasKey('versionId', $result);
- $this->assertArrayHasKey('copyright', $result);
+ self::assertArrayHasKey('version', $result);
+ self::assertArrayHasKey('versionId', $result);
+ self::assertArrayHasKey('copyright', $result);
- $this->assertSame(Constants::VERSION, $result['version']);
- $this->assertSame(Constants::VERSION_ID, $result['versionId']);
- $this->assertEquals(
+ self::assertSame(Constants::VERSION, $result['version']);
+ self::assertSame(Constants::VERSION_ID, $result['versionId']);
+ self::assertEquals(
'Kimai ' . Constants::VERSION . ' by Kevin Papst.',
$result['copyright']
);
@@ -68,7 +68,7 @@ class StatusControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/plugins');
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
// no asserts, as plugins are disabled in tests
}
}
diff --git a/tests/API/TagControllerTest.php b/tests/API/TagControllerTest.php
index 3a8e01f3..2d604203 100644
--- a/tests/API/TagControllerTest.php
+++ b/tests/API/TagControllerTest.php
@@ -17,7 +17,7 @@ use Symfony\Component\HttpFoundation\Response;
/**
* @group integration
*/
-class TagControllerTest extends APIControllerBaseTest
+class TagControllerTest extends APIControllerBaseTestCase
{
/**
* @return Tag[]
@@ -45,13 +45,13 @@ class TagControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/tags');
$content = $client->getResponse()->getContent();
- $this->assertNotFalse($content);
+ self::assertNotFalse($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
- $this->assertNotEmpty($result);
- $this->assertEquals(10, \count($result));
- $this->assertEquals('Test', $result[9]);
+ self::assertIsArray($result);
+ self::assertNotEmpty($result);
+ self::assertEquals(10, \count($result));
+ self::assertEquals('Test', $result[9]);
}
public function testFindCollection(): void
@@ -60,12 +60,12 @@ class TagControllerTest extends APIControllerBaseTest
$this->importTagFixtures();
$this->assertAccessIsGranted($client, '/api/tags/find', 'GET', ['name' => '2018']);
$content = $client->getResponse()->getContent();
- $this->assertNotFalse($content);
+ self::assertNotFalse($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
- $this->assertNotEmpty($result);
- $this->assertEquals(3, \count($result));
+ self::assertIsArray($result);
+ self::assertNotEmpty($result);
+ self::assertEquals(3, \count($result));
self::assertIsArray($result[0]);
self::assertApiResponseTypeStructure('TagEntity', $result[0]);
}
@@ -78,12 +78,12 @@ class TagControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/tags', 'GET', $query);
$content = $client->getResponse()->getContent();
- $this->assertNotFalse($content);
+ self::assertNotFalse($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
- $this->assertEmpty($result);
- $this->assertEquals(0, \count($result));
+ self::assertIsArray($result);
+ self::assertEmpty($result);
+ self::assertEquals(0, \count($result));
}
public function testPostAction(): void
@@ -95,15 +95,15 @@ class TagControllerTest extends APIControllerBaseTest
'color' => '#00ff00'
];
$this->request($client, '/api/tags', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
- $this->assertNotFalse($content);
+ self::assertNotFalse($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('TagEntity', $result);
- $this->assertNotEmpty($result['id']);
+ self::assertNotEmpty($result['id']);
self::assertEquals('#00ff00', $result['color']);
}
@@ -117,7 +117,7 @@ class TagControllerTest extends APIControllerBaseTest
];
$this->request($client, '/api/tags', 'POST', [], json_encode($data));
$response = $client->getResponse();
- $this->assertEquals(400, $response->getStatusCode());
+ self::assertEquals(400, $response->getStatusCode());
$this->assertApiCallValidationError($response, ['name', 'color']);
}
@@ -129,15 +129,15 @@ class TagControllerTest extends APIControllerBaseTest
'name' => 'foo',
];
$this->request($client, '/api/tags', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
- $this->assertNotFalse($content);
+ self::assertNotFalse($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('TagEntity', $result);
- $this->assertNotEmpty($result['id']);
+ self::assertNotEmpty($result['id']);
self::assertEquals('foo', $result['name']);
}
@@ -149,16 +149,16 @@ class TagControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/tags', 'GET', $query);
$content = $client->getResponse()->getContent();
- $this->assertNotFalse($content);
+ self::assertNotFalse($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
- $this->assertNotEmpty($result);
- $this->assertEquals(3, \count($result));
+ self::assertIsArray($result);
+ self::assertNotEmpty($result);
+ self::assertEquals(3, \count($result));
- $this->assertEquals('Administration', $result[0]);
- $this->assertEquals('Bug Fixing', $result[1]);
- $this->assertEquals('Marketing', $result[2]);
+ self::assertEquals('Administration', $result[0]);
+ self::assertEquals('Bug Fixing', $result[1]);
+ self::assertEquals('Marketing', $result[2]);
}
public function testDeleteAction(): void
@@ -168,17 +168,17 @@ class TagControllerTest extends APIControllerBaseTest
$id = $tags[0]->getId();
$this->request($client, '/api/tags/' . $id, 'DELETE');
- $this->assertTrue($client->getResponse()->isSuccessful());
- $this->assertEquals(Response::HTTP_NO_CONTENT, $client->getResponse()->getStatusCode());
- $this->assertEmpty($client->getResponse()->getContent());
+ self::assertTrue($client->getResponse()->isSuccessful());
+ self::assertEquals(Response::HTTP_NO_CONTENT, $client->getResponse()->getStatusCode());
+ self::assertEmpty($client->getResponse()->getContent());
$this->assertAccessIsGranted($client, '/api/tags');
$content = $client->getResponse()->getContent();
- $this->assertNotFalse($content);
+ self::assertNotFalse($content);
$result = json_decode($content, true);
- $this->assertEquals(9, \count($result));
+ self::assertEquals(9, \count($result));
}
public function testDeleteActionWithUnknownTimesheet(): void
diff --git a/tests/API/TeamControllerTest.php b/tests/API/TeamControllerTest.php
index df4e1b2f..9e1d6ec8 100644
--- a/tests/API/TeamControllerTest.php
+++ b/tests/API/TeamControllerTest.php
@@ -18,7 +18,7 @@ use Symfony\Component\HttpFoundation\Response;
/**
* @group integration
*/
-class TeamControllerTest extends APIControllerBaseTest
+class TeamControllerTest extends APIControllerBaseTestCase
{
/**
* @return Team[]
@@ -39,7 +39,7 @@ class TeamControllerTest extends APIControllerBaseTest
/**
* @return array>
*/
- public function getRoleTestData(): array
+ public static function getRoleTestData(): array
{
return [
[User::ROLE_USER],
@@ -62,8 +62,8 @@ class TeamControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/teams');
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertNotEmpty($result);
+ self::assertIsArray($result);
+ self::assertNotEmpty($result);
self::assertEquals(2, \count($result));
self::assertIsArray($result[0]);
self::assertApiResponseTypeStructure('TeamCollection', $result[0]);
@@ -78,7 +78,7 @@ class TeamControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/teams/' . $id);
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('TeamEntity', $result);
}
@@ -103,12 +103,12 @@ class TeamControllerTest extends APIControllerBaseTest
],
];
$this->request($client, '/api/teams', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('TeamEntity', $result);
- $this->assertNotEmpty($result['id']);
+ self::assertNotEmpty($result['id']);
}
public function testPostActionWithInvalidUser(): void
@@ -135,7 +135,7 @@ class TeamControllerTest extends APIControllerBaseTest
$this->request($client, '/api/teams', 'POST', [], json_encode($data));
$response = $client->getResponse();
- $this->assertEquals(400, $response->getStatusCode());
+ self::assertEquals(400, $response->getStatusCode());
$this->assertApiCallValidationError($response, ['name', 'members.0.user']);
}
@@ -151,11 +151,11 @@ class TeamControllerTest extends APIControllerBaseTest
]
];
$this->request($client, '/api/teams', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
$updateId = $result['id'];
- $this->assertIsNumeric($updateId);
+ self::assertIsNumeric($updateId);
$data = [
'name' => 'foo',
@@ -167,24 +167,24 @@ class TeamControllerTest extends APIControllerBaseTest
];
$this->request($client, '/api/teams/' . $updateId, 'PATCH', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('TeamEntity', $result);
- $this->assertNotEmpty($result['id']);
+ self::assertNotEmpty($result['id']);
self::assertCount(3, $result['members']);
- $this->assertIsNumeric($updateId);
+ self::assertIsNumeric($updateId);
$this->request($client, '/api/teams/' . $updateId);
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('TeamEntity', $result);
- $this->assertIsArray($result['members']);
+ self::assertIsArray($result['members']);
self::assertCount(3, $result['members']);
- $this->assertIsArray($result['members'][1]);
+ self::assertIsArray($result['members'][1]);
self::assertFalse($result['members'][1]['teamlead']);
self::assertEquals(1, $result['members'][1]['user']['id']);
self::assertEquals('clara_customer', $result['members'][1]['user']['username']);
@@ -208,10 +208,10 @@ class TeamControllerTest extends APIControllerBaseTest
],
];
$this->request($client, '/api/teams', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertIsNumeric($result['id']);
+ self::assertIsArray($result);
+ self::assertIsNumeric($result['id']);
$data = [
'name' => '1',
@@ -222,7 +222,7 @@ class TeamControllerTest extends APIControllerBaseTest
$this->request($client, '/api/teams/' . $result['id'], 'PATCH', [], json_encode($data));
$response = $client->getResponse();
- $this->assertEquals(400, $response->getStatusCode());
+ self::assertEquals(400, $response->getStatusCode());
$this->assertApiCallValidationError($response, ['name', 'members.0.user']);
}
@@ -234,16 +234,16 @@ class TeamControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/teams/' . $id);
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('TeamEntity', $result);
- $this->assertNotEmpty($result['id']);
+ self::assertNotEmpty($result['id']);
$id = $result['id'];
- $this->assertIsNumeric($id);
+ self::assertIsNumeric($id);
$this->request($client, '/api/teams/' . $id, 'DELETE');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
self::assertEquals(Response::HTTP_NO_CONTENT, $client->getResponse()->getStatusCode());
- $this->assertEmpty($client->getResponse()->getContent());
+ self::assertEmpty($client->getResponse()->getContent());
}
public function testPostMemberAction(): void
@@ -256,20 +256,20 @@ class TeamControllerTest extends APIControllerBaseTest
],
];
$this->request($client, '/api/teams', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertIsArray($result['members']);
+ self::assertIsArray($result);
+ self::assertIsArray($result['members']);
self::assertCount(1, $result['members']);
- $this->assertIsNumeric($result['id']);
+ self::assertIsNumeric($result['id']);
$this->request($client, '/api/teams/' . $result['id'] . '/members/2', 'POST');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('TeamEntity', $result);
- $this->assertIsArray($result['members']);
+ self::assertIsArray($result['members']);
self::assertCount(2, $result['members']);
}
@@ -284,10 +284,10 @@ class TeamControllerTest extends APIControllerBaseTest
],
];
$this->request($client, '/api/teams', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertIsNumeric($result['id']);
+ self::assertIsArray($result);
+ self::assertIsNumeric($result['id']);
// team not found
$this->assertEntityNotFoundForPost($client, '/api/teams/999/members/999');
@@ -297,7 +297,7 @@ class TeamControllerTest extends APIControllerBaseTest
// add user
$this->request($client, '/api/teams/' . $result['id'] . '/members/5', 'POST');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
// cannot add existing member
$this->assertBadRequest($client, '/api/teams/' . $result['id'] . '/members/5', 'POST');
@@ -316,20 +316,20 @@ class TeamControllerTest extends APIControllerBaseTest
],
];
$this->request($client, '/api/teams', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertIsNumeric($result['id']);
- $this->assertIsArray($result['members']);
+ self::assertIsArray($result);
+ self::assertIsNumeric($result['id']);
+ self::assertIsArray($result['members']);
self::assertCount(4, $result['members']);
$this->request($client, '/api/teams/' . $result['id'] . '/members/2', 'DELETE');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('TeamEntity', $result);
- $this->assertIsArray($result['members']);
+ self::assertIsArray($result['members']);
self::assertCount(3, $result['members']);
}
@@ -346,10 +346,10 @@ class TeamControllerTest extends APIControllerBaseTest
],
];
$this->request($client, '/api/teams', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertIsNumeric($result['id']);
+ self::assertIsArray($result);
+ self::assertIsNumeric($result['id']);
// team not found
$this->assertNotFoundForDelete($client, '/api/teams/999/members/999');
@@ -359,7 +359,7 @@ class TeamControllerTest extends APIControllerBaseTest
// remove user
$this->request($client, '/api/teams/' . $result['id'] . '/members/2', 'DELETE');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
// cannot remove non-member
$this->assertBadRequest($client, '/api/teams/' . $result['id'] . '/members/2', 'DELETE');
@@ -378,21 +378,21 @@ class TeamControllerTest extends APIControllerBaseTest
],
];
$this->request($client, '/api/teams', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertIsNumeric($result['id']);
+ self::assertIsArray($result);
+ self::assertIsNumeric($result['id']);
self::assertCount(0, $result['customers']);
$this->request($client, '/api/teams/' . $result['id'] . '/customers/1', 'POST');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('TeamEntity', $result);
- $this->assertIsArray($result['customers']);
+ self::assertIsArray($result['customers']);
self::assertCount(1, $result['customers']);
- $this->assertIsArray($result['customers'][0]);
+ self::assertIsArray($result['customers'][0]);
self::assertEquals(1, $result['customers'][0]['id']);
}
@@ -407,10 +407,10 @@ class TeamControllerTest extends APIControllerBaseTest
],
];
$this->request($client, '/api/teams', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertIsNumeric($result['id']);
+ self::assertIsArray($result);
+ self::assertIsNumeric($result['id']);
// team not found
$this->assertEntityNotFoundForPost($client, '/api/teams/999/customers/999');
@@ -420,10 +420,10 @@ class TeamControllerTest extends APIControllerBaseTest
// add customer
$this->request($client, '/api/teams/' . $result['id'] . '/customers/1', 'POST');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertIsNumeric($result['id']);
+ self::assertIsArray($result);
+ self::assertIsNumeric($result['id']);
self::assertCount(1, $result['customers']);
// cannot add existing customer
@@ -443,29 +443,29 @@ class TeamControllerTest extends APIControllerBaseTest
],
];
$this->request($client, '/api/teams', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertIsNumeric($result['id']);
+ self::assertIsArray($result);
+ self::assertIsNumeric($result['id']);
self::assertCount(0, $result['customers']);
// add customer
$this->request($client, '/api/teams/' . $result['id'] . '/customers/1', 'POST');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertIsNumeric($result['id']);
+ self::assertIsArray($result);
+ self::assertIsNumeric($result['id']);
self::assertCount(1, $result['customers']);
$this->request($client, '/api/teams/' . $result['id'] . '/customers/1', 'DELETE');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertIsNumeric($result['id']);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
+ self::assertIsNumeric($result['id']);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('TeamEntity', $result);
- $this->assertIsArray($result['customers']);
+ self::assertIsArray($result['customers']);
self::assertCount(0, $result['customers']);
/** @var EntityManager $em */
@@ -488,10 +488,10 @@ class TeamControllerTest extends APIControllerBaseTest
],
];
$this->request($client, '/api/teams', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertIsNumeric($result['id']);
+ self::assertIsArray($result);
+ self::assertIsNumeric($result['id']);
// team not found
$this->assertNotFoundForDelete($client, '/api/teams/999/customers/999');
@@ -513,20 +513,20 @@ class TeamControllerTest extends APIControllerBaseTest
],
];
$this->request($client, '/api/teams', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertIsNumeric($result['id']);
+ self::assertIsArray($result);
+ self::assertIsNumeric($result['id']);
self::assertCount(0, $result['projects']);
$this->request($client, '/api/teams/' . $result['id'] . '/projects/1', 'POST');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('TeamEntity', $result);
- $this->assertIsArray($result['projects']);
+ self::assertIsArray($result['projects']);
self::assertCount(1, $result['projects']);
- $this->assertIsArray($result['projects'][0]);
+ self::assertIsArray($result['projects'][0]);
self::assertEquals(1, $result['projects'][0]['id']);
}
@@ -541,10 +541,10 @@ class TeamControllerTest extends APIControllerBaseTest
],
];
$this->request($client, '/api/teams', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertIsNumeric($result['id']);
+ self::assertIsArray($result);
+ self::assertIsNumeric($result['id']);
// team not found
$this->assertEntityNotFoundForPost($client, '/api/teams/999/projects/999');
@@ -556,10 +556,10 @@ class TeamControllerTest extends APIControllerBaseTest
// add project
$this->request($client, '/api/teams/' . $result['id'] . '/projects/1', 'POST');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertIsNumeric($result['id']);
+ self::assertIsArray($result);
+ self::assertIsNumeric($result['id']);
self::assertCount(1, $result['projects']);
// cannot add existing project
@@ -579,27 +579,27 @@ class TeamControllerTest extends APIControllerBaseTest
],
];
$this->request($client, '/api/teams', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertIsNumeric($result['id']);
+ self::assertIsArray($result);
+ self::assertIsNumeric($result['id']);
self::assertCount(0, $result['projects']);
// add project
$this->request($client, '/api/teams/' . $result['id'] . '/projects/1', 'POST');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertIsArray($result['projects']);
+ self::assertIsArray($result);
+ self::assertIsArray($result['projects']);
self::assertCount(1, $result['projects']);
$this->request($client, '/api/teams/' . $result['id'] . '/projects/1', 'DELETE');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('TeamEntity', $result);
- $this->assertIsArray($result['projects']);
+ self::assertIsArray($result['projects']);
self::assertCount(0, $result['projects']);
/** @var EntityManager $em */
@@ -622,10 +622,10 @@ class TeamControllerTest extends APIControllerBaseTest
],
];
$this->request($client, '/api/teams', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertIsNumeric($result['id']);
+ self::assertIsArray($result);
+ self::assertIsNumeric($result['id']);
// team not found
$this->assertNotFoundForDelete($client, '/api/teams/999/projects/999');
@@ -647,20 +647,20 @@ class TeamControllerTest extends APIControllerBaseTest
],
];
$this->request($client, '/api/teams', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertIsNumeric($result['id']);
+ self::assertIsArray($result);
+ self::assertIsNumeric($result['id']);
self::assertCount(0, $result['activities']);
$this->request($client, '/api/teams/' . $result['id'] . '/activities/1', 'POST');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('TeamEntity', $result);
- $this->assertIsArray($result['activities']);
+ self::assertIsArray($result['activities']);
self::assertCount(1, $result['activities']);
- $this->assertIsArray($result['activities'][0]);
+ self::assertIsArray($result['activities'][0]);
self::assertEquals(1, $result['activities'][0]['id']);
}
@@ -675,10 +675,10 @@ class TeamControllerTest extends APIControllerBaseTest
],
];
$this->request($client, '/api/teams', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertIsNumeric($result['id']);
+ self::assertIsArray($result);
+ self::assertIsNumeric($result['id']);
// team not found
$this->assertEntityNotFoundForPost($client, '/api/teams/999/activities/999');
@@ -688,10 +688,10 @@ class TeamControllerTest extends APIControllerBaseTest
// add activity
$this->request($client, '/api/teams/' . $result['id'] . '/activities/1', 'POST');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertIsNumeric($result['id']);
+ self::assertIsArray($result);
+ self::assertIsNumeric($result['id']);
self::assertCount(1, $result['activities']);
// cannot add existing activity
@@ -711,27 +711,27 @@ class TeamControllerTest extends APIControllerBaseTest
],
];
$this->request($client, '/api/teams', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertIsArray($result['activities']);
+ self::assertIsArray($result);
+ self::assertIsArray($result['activities']);
self::assertCount(0, $result['activities']);
// add activity
$this->request($client, '/api/teams/' . $result['id'] . '/activities/1', 'POST');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertIsNumeric($result['id']);
+ self::assertIsArray($result);
+ self::assertIsNumeric($result['id']);
self::assertCount(1, $result['activities']);
$this->request($client, '/api/teams/' . $result['id'] . '/activities/1', 'DELETE');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('TeamEntity', $result);
- $this->assertIsArray($result['activities']);
+ self::assertIsArray($result['activities']);
self::assertCount(0, $result['activities']);
}
@@ -748,10 +748,10 @@ class TeamControllerTest extends APIControllerBaseTest
],
];
$this->request($client, '/api/teams', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$result = json_decode($client->getResponse()->getContent(), true);
- $this->assertIsArray($result);
- $this->assertIsNumeric($result['id']);
+ self::assertIsArray($result);
+ self::assertIsNumeric($result['id']);
// team not found
$this->assertNotFoundForDelete($client, '/api/teams/999/activities/9999');
diff --git a/tests/API/TimesheetControllerTest.php b/tests/API/TimesheetControllerTest.php
index 8d75f335..b0052658 100644
--- a/tests/API/TimesheetControllerTest.php
+++ b/tests/API/TimesheetControllerTest.php
@@ -26,7 +26,7 @@ use Symfony\Component\HttpFoundation\Response;
/**
* @group integration
*/
-class TimesheetControllerTest extends APIControllerBaseTest
+class TimesheetControllerTest extends APIControllerBaseTestCase
{
public const DATE_FORMAT = 'Y-m-d H:i:s';
public const DATE_FORMAT_HTML5 = 'Y-m-d\TH:i:s';
@@ -64,7 +64,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertIsArray($result);
self::assertNotEmpty($result);
self::assertEquals(10, \count($result));
- $this->assertIsArray($result[0]);
+ self::assertIsArray($result[0]);
self::assertApiResponseTypeStructure('TimesheetCollection', $result[0]);
}
@@ -81,7 +81,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertIsArray($result);
self::assertNotEmpty($result);
self::assertEquals(10, \count($result));
- $this->assertIsArray($result[0]);
+ self::assertIsArray($result[0]);
self::assertApiResponseTypeStructure('TimesheetCollectionFull', $result[0]);
}
@@ -106,7 +106,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertIsArray($result);
self::assertNotEmpty($result);
self::assertEquals(10, \count($result));
- $this->assertIsArray($result[0]);
+ self::assertIsArray($result[0]);
self::assertApiResponseTypeStructure('TimesheetCollection', $result[0]);
$query = ['users' => [2]];
@@ -119,7 +119,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertIsArray($result);
self::assertNotEmpty($result);
self::assertEquals(10, \count($result));
- $this->assertIsArray($result[0]);
+ self::assertIsArray($result[0]);
self::assertApiResponseTypeStructure('TimesheetCollection', $result[0]);
}
@@ -167,7 +167,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertIsArray($result);
self::assertNotEmpty($result);
self::assertEquals(10, \count($result));
- $this->assertIsArray($result[0]);
+ self::assertIsArray($result[0]);
self::assertApiResponseTypeStructure('TimesheetCollection', $result[0]);
}
@@ -192,7 +192,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertIsArray($result);
self::assertNotEmpty($result);
self::assertEquals(17, \count($result));
- $this->assertIsArray($result[0]);
+ self::assertIsArray($result[0]);
self::assertApiResponseTypeStructure('TimesheetCollection', $result[0]);
}
@@ -207,7 +207,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
$result = json_decode($content, true);
self::assertIsArray($result);
- $this->assertEmpty($result);
+ self::assertEmpty($result);
}
public function testGetCollectionWithQuery(): void
@@ -244,7 +244,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertIsArray($result);
self::assertNotEmpty($result);
self::assertEquals(4, \count($result));
- $this->assertIsArray($result[0]);
+ self::assertIsArray($result[0]);
self::assertApiResponseTypeStructure('TimesheetCollection', $result[0]);
}
@@ -297,7 +297,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertIsArray($result);
self::assertNotEmpty($result);
self::assertEquals(5, \count($result));
- $this->assertIsArray($result[0]);
+ self::assertIsArray($result[0]);
self::assertApiResponseTypeStructure('TimesheetCollection', $result[0]);
}
@@ -333,7 +333,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertIsArray($result);
self::assertNotEmpty($result);
self::assertEquals(7, \count($result));
- $this->assertIsArray($result[0]);
+ self::assertIsArray($result[0]);
self::assertApiResponseTypeStructure('TimesheetCollection', $result[0]);
$query = [
@@ -352,7 +352,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertIsArray($result);
self::assertNotEmpty($result);
self::assertEquals(10, \count($result));
- $this->assertIsArray($result[0]);
+ self::assertIsArray($result[0]);
self::assertApiResponseTypeStructure('TimesheetCollection', $result[0]);
$query = [
@@ -369,7 +369,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertIsArray($result);
self::assertNotEmpty($result);
self::assertEquals(17, \count($result));
- $this->assertIsArray($result[0]);
+ self::assertIsArray($result[0]);
self::assertApiResponseTypeStructure('TimesheetCollection', $result[0]);
}
@@ -440,7 +440,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_USER);
$this->importFixtureForUser(User::ROLE_USER);
$timesheets = $this->importFixtureForUser(User::ROLE_ADMIN);
- $this->assertCount(10, $timesheets);
+ self::assertCount(10, $timesheets);
$this->assertApiAccessDenied($client, '/api/timesheets/' . $timesheets[0]->getId(), 'Access denied.');
}
@@ -480,7 +480,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
$json = json_encode($data);
self::assertIsString($json);
$this->request($client, '/api/timesheets', 'POST', [], $json);
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
self::assertIsString($content);
@@ -489,9 +489,9 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertIsArray($result);
self::assertApiResponseTypeStructure('TimesheetEntity', $result);
self::assertNotEmpty($result['id']);
- $this->assertTrue($result['duration'] == 28800 || $result['duration'] == 28860); // 1 minute rounding might be applied
+ self::assertTrue($result['duration'] == 28800 || $result['duration'] == 28860); // 1 minute rounding might be applied
self::assertEquals(2016, $result['rate']);
- $this->assertFalse($result['billable']);
+ self::assertFalse($result['billable']);
}
public function testPostActionWithFullExpandedResponse(): void
@@ -511,7 +511,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
$json = json_encode($data);
self::assertIsString($json);
$this->request($client, '/api/timesheets?full=true', 'POST', [], $json);
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
self::assertIsString($content);
@@ -520,9 +520,9 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertIsArray($result);
self::assertApiResponseTypeStructure('TimesheetExpanded', $result);
self::assertNotEmpty($result['id']);
- $this->assertTrue($result['duration'] == 28800 || $result['duration'] == 28860); // 1 minute rounding might be applied
+ self::assertTrue($result['duration'] == 28800 || $result['duration'] == 28860); // 1 minute rounding might be applied
self::assertEquals(2016, $result['rate']);
- $this->assertTrue($result['billable']);
+ self::assertTrue($result['billable']);
}
public function testPostActionForDifferentUser(): void
@@ -545,7 +545,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
$json = json_encode($data);
self::assertIsString($json);
$this->request($client, '/api/timesheets', 'POST', [], $json);
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
self::assertIsString($content);
@@ -556,7 +556,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertNotEmpty($result['id']);
self::assertEquals($user->getId(), $result['user']);
$this->assertNotEquals($admin->getId(), $result['user']);
- $this->assertTrue($result['billable']);
+ self::assertTrue($result['billable']);
}
// check for project, as this is a required field. It will not be included in the select, as it is
@@ -711,7 +711,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
$json = json_encode($data);
self::assertIsString($json);
$this->request($client, '/api/timesheets', 'POST', [], $json);
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
self::assertIsString($content);
@@ -719,7 +719,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertIsArray($result);
self::assertApiResponseTypeStructure('TimesheetEntity', $result);
- $this->assertFalse($result['billable']);
+ self::assertFalse($result['billable']);
}
public function testPostActionWithNonBillableCustomerExplicit(): void
@@ -752,7 +752,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
$json = json_encode($data);
self::assertIsString($json);
$this->request($client, '/api/timesheets', 'POST', [], $json);
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
self::assertIsString($content);
@@ -761,10 +761,10 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertIsArray($result);
self::assertApiResponseTypeStructure('TimesheetEntity', $result);
// explicit overwritten values win!
- $this->assertTrue($result['billable']);
+ self::assertTrue($result['billable']);
}
- public function getTrackingModeTestData(): array
+ public static function getTrackingModeTestData(): array
{
return [
['duration_fixed_begin', User::ROLE_USER, false],
@@ -800,7 +800,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
$response = $client->getResponse();
if ($showTimes) {
- $this->assertTrue($response->isSuccessful());
+ self::assertTrue($response->isSuccessful());
} else {
$this->assertApiCallValidationError($response, [], true, [], [], ['begin', 'end']);
}
@@ -822,7 +822,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
$json = json_encode($data);
self::assertIsString($json);
$this->request($client, '/api/timesheets/' . $timesheets[0]->getId(), 'PATCH', [], $json);
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
self::assertIsString($content);
@@ -833,7 +833,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertNotEmpty($result['id']);
self::assertEquals(25200, $result['duration']);
self::assertEquals('foo', $result['description']);
- $this->assertFalse($result['billable']);
+ self::assertFalse($result['billable']);
}
public function testPatchActionWithInvalidUser(): void
@@ -912,9 +912,9 @@ class TimesheetControllerTest extends APIControllerBaseTest
$id = $result['id'];
$this->request($client, '/api/timesheets/' . $id, 'DELETE');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
self::assertEquals(Response::HTTP_NO_CONTENT, $client->getResponse()->getStatusCode());
- $this->assertEmpty($client->getResponse()->getContent());
+ self::assertEmpty($client->getResponse()->getContent());
}
public function testDeleteActionWithUnknownTimesheet(): void
@@ -929,9 +929,9 @@ class TimesheetControllerTest extends APIControllerBaseTest
$timesheets = $this->importFixtureForUser(User::ROLE_USER);
$this->request($client, '/api/timesheets/' . $timesheets[0]->getId(), 'DELETE');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
self::assertEquals(Response::HTTP_NO_CONTENT, $client->getResponse()->getStatusCode());
- $this->assertEmpty($client->getResponse()->getContent());
+ self::assertEmpty($client->getResponse()->getContent());
}
public function testDeleteActionWithoutAuthorization(): void
@@ -979,7 +979,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
$em->flush();
$this->request($client, '/api/timesheets/' . $id, 'DELETE');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
}
public function testGetRecentAction(): void
@@ -1012,7 +1012,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertIsArray($result);
self::assertNotEmpty($result);
self::assertEquals(1, \count($result));
- $this->assertIsArray($result[0]);
+ self::assertIsArray($result[0]);
self::assertApiResponseTypeStructure('TimesheetCollectionFull', $result[0]);
}
@@ -1030,7 +1030,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
$this->importFixture($fixture);
$this->request($client, '/api/timesheets/active');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
self::assertIsString($content);
@@ -1038,7 +1038,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertEquals(3, \count($result));
foreach ($result as $timesheet) {
- $this->assertIsArray($timesheet);
+ self::assertIsArray($timesheet);
self::assertApiResponseTypeStructure('TimesheetCollectionFull', $timesheet);
}
}
@@ -1063,7 +1063,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
$id = $timesheets[0]->getId();
$this->request($client, '/api/timesheets/' . $id . '/stop', 'PATCH');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
self::assertIsString($content);
@@ -1076,7 +1076,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
$em = $this->getEntityManager();
/** @var Timesheet $timesheet */
$timesheet = $em->getRepository(Timesheet::class)->find($id);
- $this->assertInstanceOf(\DateTime::class, $timesheet->getEnd());
+ self::assertInstanceOf(\DateTime::class, $timesheet->getEnd());
}
public function testStopActionTriggersValidationOnLongRunning(): void
@@ -1157,7 +1157,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertIsArray($result);
self::assertNotEmpty($result);
self::assertEquals(10, \count($result));
- $this->assertIsArray($result[0]);
+ self::assertIsArray($result[0]);
self::assertApiResponseTypeStructure('TimesheetCollection', $result[0]);
$query = ['tags' => ['Test', 'Admin']];
@@ -1170,7 +1170,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertIsArray($result);
self::assertNotEmpty($result);
self::assertEquals(10, \count($result));
- $this->assertIsArray($result[0]);
+ self::assertIsArray($result[0]);
self::assertApiResponseTypeStructure('TimesheetCollection', $result[0]);
$query = ['tags' => ['Nothing-2-see', 'not-existing-here']];
@@ -1193,26 +1193,26 @@ class TimesheetControllerTest extends APIControllerBaseTest
$this->request($client, '/api/timesheets/' . $id, 'PATCH', [], $json);
$this->request($client, '/api/timesheets/' . $id . '/restart', 'PATCH');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('TimesheetEntity', $result);
- $this->assertEmpty($result['description']);
- $this->assertEmpty($result['tags']);
+ self::assertEmpty($result['description']);
+ self::assertEmpty($result['tags']);
$em = $this->getEntityManager();
/** @var Timesheet $timesheet */
$timesheet = $em->getRepository(Timesheet::class)->find($result['id']);
- $this->assertInstanceOf(\DateTime::class, $timesheet->getBegin());
- $this->assertNull($timesheet->getEnd());
+ self::assertInstanceOf(\DateTime::class, $timesheet->getBegin());
+ self::assertNull($timesheet->getEnd());
self::assertEquals(1, $timesheet->getActivity()->getId());
self::assertEquals(1, $timesheet->getProject()->getId());
- $this->assertEmpty($timesheet->getDescription());
- $this->assertEmpty($timesheet->getTags());
+ self::assertEmpty($timesheet->getDescription());
+ self::assertEmpty($timesheet->getTags());
}
public function testRestartActionWithBegin(): void
@@ -1231,27 +1231,27 @@ class TimesheetControllerTest extends APIControllerBaseTest
$begin = new \DateTime('2019-11-27 13:55:00');
$this->request($client, '/api/timesheets/' . $id . '/restart', 'PATCH', ['begin' => $begin->format(BaseApiController::DATE_FORMAT_PHP)]);
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('TimesheetEntity', $result);
- $this->assertEmpty($result['description']);
- $this->assertEmpty($result['tags']);
+ self::assertEmpty($result['description']);
+ self::assertEmpty($result['tags']);
$em = $this->getEntityManager();
/** @var Timesheet $timesheet */
$timesheet = $em->getRepository(Timesheet::class)->find($result['id']);
- $this->assertInstanceOf(\DateTime::class, $timesheet->getBegin());
+ self::assertInstanceOf(\DateTime::class, $timesheet->getBegin());
self::assertEquals($begin->format(BaseApiController::DATE_FORMAT_PHP), $timesheet->getBegin()->format(BaseApiController::DATE_FORMAT_PHP));
- $this->assertNull($timesheet->getEnd());
+ self::assertNull($timesheet->getEnd());
self::assertEquals(1, $timesheet->getActivity()->getId());
self::assertEquals(1, $timesheet->getProject()->getId());
- $this->assertEmpty($timesheet->getDescription());
- $this->assertEmpty($timesheet->getTags());
+ self::assertEmpty($timesheet->getDescription());
+ self::assertEmpty($timesheet->getTags());
}
public function testRestartActionWithCopyData(): void
@@ -1277,13 +1277,13 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertEquals('foo', $timesheet->getDescription());
$this->request($client, '/api/timesheets/' . $id . '/restart', 'PATCH', ['copy' => 'all']);
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('TimesheetEntity', $result);
self::assertEquals('foo', $result['description']);
self::assertEquals([['name' => 'sdfsdf', 'value' => 'nnnnn'], ['name' => '1234567890', 'value' => '1234567890']], $result['metaFields']);
@@ -1292,8 +1292,8 @@ class TimesheetControllerTest extends APIControllerBaseTest
$em = $this->getEntityManager();
/** @var Timesheet $timesheet */
$timesheet = $em->getRepository(Timesheet::class)->find($result['id']);
- $this->assertInstanceOf(\DateTime::class, $timesheet->getBegin());
- $this->assertNull($timesheet->getEnd());
+ self::assertInstanceOf(\DateTime::class, $timesheet->getBegin());
+ self::assertNull($timesheet->getEnd());
self::assertEquals(1, $timesheet->getActivity()->getId());
self::assertEquals(1, $timesheet->getProject()->getId());
self::assertEquals('foo', $timesheet->getDescription());
@@ -1343,7 +1343,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
$json = json_encode($data);
self::assertIsString($json);
$this->request($client, '/api/timesheets', 'POST', [], $json);
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
self::assertIsString($content);
@@ -1352,12 +1352,12 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertIsArray($result);
self::assertApiResponseTypeStructure('TimesheetEntity', $result);
self::assertNotEmpty($result['id']);
- $this->assertTrue($result['duration'] == 28800 || $result['duration'] == 28860); // 1 minute rounding might be applied
+ self::assertTrue($result['duration'] == 28800 || $result['duration'] == 28860); // 1 minute rounding might be applied
self::assertEquals(2016, $result['rate']);
$id = $result['id'];
self::assertIsNumeric($id);
$this->request($client, '/api/timesheets/' . $id . '/duplicate', 'PATCH');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
self::assertIsString($content);
@@ -1366,7 +1366,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertIsArray($result);
self::assertApiResponseTypeStructure('TimesheetEntity', $result);
self::assertNotEmpty($result['id']);
- $this->assertTrue($result['duration'] == 28800 || $result['duration'] == 28860); // 1 minute rounding might be applied
+ self::assertTrue($result['duration'] == 28800 || $result['duration'] == 28860); // 1 minute rounding might be applied
self::assertEquals(2016, $result['rate']);
}
@@ -1384,29 +1384,29 @@ class TimesheetControllerTest extends APIControllerBaseTest
$em = $this->getEntityManager();
/** @var Timesheet $timesheet */
$timesheet = $em->getRepository(Timesheet::class)->find($id);
- $this->assertFalse($timesheet->isExported());
+ self::assertFalse($timesheet->isExported());
$this->request($client, '/api/timesheets/' . $id . '/export', 'PATCH');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('TimesheetEntity', $result);
$em->clear();
/** @var Timesheet $timesheet */
$timesheet = $em->getRepository(Timesheet::class)->find($id);
- $this->assertTrue($timesheet->isExported());
+ self::assertTrue($timesheet->isExported());
$this->request($client, '/api/timesheets/' . $id . '/export', 'PATCH');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$em->clear();
$timesheet = $em->getRepository(Timesheet::class)->find($id);
- $this->assertFalse($timesheet->isExported());
+ self::assertFalse($timesheet->isExported());
}
public function testExportNotAllowedForUser(): void
@@ -1482,13 +1482,13 @@ class TimesheetControllerTest extends APIControllerBaseTest
self::assertIsString($json);
$this->request($client, '/api/timesheets/' . $id . '/meta', 'PATCH', [], $json);
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('TimesheetEntity', $result);
self::assertEquals(['name' => 'metatestmock', 'value' => 'another,testing,bar'], $result['metaFields'][0]);
diff --git a/tests/API/UserControllerTest.php b/tests/API/UserControllerTest.php
index 54bff0d8..40636601 100644
--- a/tests/API/UserControllerTest.php
+++ b/tests/API/UserControllerTest.php
@@ -14,7 +14,7 @@ use App\Entity\User;
/**
* @group integration
*/
-class UserControllerTest extends APIControllerBaseTest
+class UserControllerTest extends APIControllerBaseTestCase
{
public function testIsSecure(): void
{
@@ -24,7 +24,7 @@ class UserControllerTest extends APIControllerBaseTest
/**
* @return array>
*/
- public function getRoleTestData(): array
+ public static function getRoleTestData(): array
{
return [
[User::ROLE_USER],
@@ -46,14 +46,14 @@ class UserControllerTest extends APIControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_SUPER_ADMIN);
$this->assertAccessIsGranted($client, '/api/users');
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
- $this->assertNotEmpty($result);
- $this->assertEquals(7, \count($result));
+ self::assertIsArray($result);
+ self::assertNotEmpty($result);
+ self::assertEquals(7, \count($result));
foreach ($result as $user) {
- $this->assertIsArray($user);
+ self::assertIsArray($user);
self::assertApiResponseTypeStructure('UserCollection', $user);
}
}
@@ -64,14 +64,14 @@ class UserControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/users?full=true');
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
- $this->assertNotEmpty($result);
- $this->assertEquals(7, \count($result));
+ self::assertIsArray($result);
+ self::assertNotEmpty($result);
+ self::assertEquals(7, \count($result));
foreach ($result as $user) {
- $this->assertIsArray($user);
+ self::assertIsArray($user);
self::assertApiResponseTypeStructure('UserEntity', $user);
}
}
@@ -81,14 +81,14 @@ class UserControllerTest extends APIControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_SUPER_ADMIN);
$this->assertAccessIsGranted($client, '/api/users', 'GET', ['visible' => 2, 'orderBy' => 'email', 'order' => 'DESC', 'term' => 'chris']);
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
- $this->assertNotEmpty($result);
- $this->assertEquals(1, \count($result));
+ self::assertIsArray($result);
+ self::assertNotEmpty($result);
+ self::assertEquals(1, \count($result));
foreach ($result as $user) {
- $this->assertIsArray($user);
+ self::assertIsArray($user);
self::assertApiResponseTypeStructure('UserCollection', $user);
}
}
@@ -98,14 +98,14 @@ class UserControllerTest extends APIControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_SUPER_ADMIN);
$this->assertAccessIsGranted($client, '/api/users', 'GET', ['visible' => 3, 'orderBy' => 'email', 'order' => 'DESC']);
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
- $this->assertNotEmpty($result);
- $this->assertEquals(8, \count($result));
+ self::assertIsArray($result);
+ self::assertNotEmpty($result);
+ self::assertEquals(8, \count($result));
foreach ($result as $user) {
- $this->assertIsArray($user);
+ self::assertIsArray($user);
self::assertApiResponseTypeStructure('UserCollection', $user);
}
}
@@ -115,10 +115,10 @@ class UserControllerTest extends APIControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_SUPER_ADMIN);
$this->assertAccessIsGranted($client, '/api/users/1');
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('UserEntity', $result);
self::assertEquals('1', $result['id']);
self::assertEquals('CFO', $result['title']);
@@ -130,10 +130,10 @@ class UserControllerTest extends APIControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_SUPER_ADMIN);
$this->assertAccessIsGranted($client, '/api/users/me');
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('UserEntity', $result);
self::assertEquals('6', $result['id']);
self::assertEquals('Super Administrator', $result['title']);
@@ -156,10 +156,10 @@ class UserControllerTest extends APIControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_USER);
$this->assertAccessIsGranted($client, '/api/users/2');
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('UserEntity', $result);
}
@@ -181,14 +181,14 @@ class UserControllerTest extends APIControllerBaseTest
],
];
$this->request($client, '/api/users', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('UserEntity', $result);
- $this->assertNotEmpty($result['id']);
+ self::assertNotEmpty($result['id']);
self::assertEquals('foo', $result['username']);
self::assertEquals('asdfghjkl', $result['title']);
self::assertTrue($result['enabled']);
@@ -216,7 +216,7 @@ class UserControllerTest extends APIControllerBaseTest
$this->request($client, '/api/users', 'POST', [], json_encode($data));
$response = $client->getResponse();
- $this->assertEquals(400, $response->getStatusCode());
+ self::assertEquals(400, $response->getStatusCode());
$this->assertApiCallValidationError($response, ['plainPassword']);
}
@@ -236,7 +236,7 @@ class UserControllerTest extends APIControllerBaseTest
$this->request($client, '/api/users', 'POST', [], json_encode($data));
$response = $client->getResponse();
- $this->assertEquals(400, $response->getStatusCode());
+ self::assertEquals(400, $response->getStatusCode());
$this->assertApiCallValidationError($response, ['username', 'email', 'plainPassword', 'language', 'timezone', 'roles']);
}
@@ -272,9 +272,9 @@ class UserControllerTest extends APIControllerBaseTest
],
];
$this->request($client, '/api/users', 'POST', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
self::assertFalse($result['enabled']);
@@ -290,14 +290,14 @@ class UserControllerTest extends APIControllerBaseTest
$id = $result['id'];
self::assertIsNumeric($id);
$this->request($client, '/api/users/' . $id, 'PATCH', [], json_encode($data));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
- $this->assertIsString($content);
+ self::assertIsString($content);
$result = json_decode($content, true);
- $this->assertIsArray($result);
+ self::assertIsArray($result);
self::assertApiResponseTypeStructure('UserEntity', $result);
- $this->assertNotEmpty($result['id']);
+ self::assertNotEmpty($result['id']);
self::assertEquals('foo', $result['username']);
self::assertEquals('qwertzui', $result['title']);
self::assertTrue($result['enabled']);
@@ -335,7 +335,7 @@ class UserControllerTest extends APIControllerBaseTest
$this->request($client, '/api/users/1', 'PATCH', [], json_encode($data));
$response = $client->getResponse();
- $this->assertEquals(400, $response->getStatusCode());
+ self::assertEquals(400, $response->getStatusCode());
$this->assertApiCallValidationError($response, ['email', 'language', 'timezone', 'roles'], true);
}
}
diff --git a/tests/Calendar/CalendarSourceTest.php b/tests/Calendar/CalendarSourceTest.php
index 55ce3e54..45a0c5d6 100644
--- a/tests/Calendar/CalendarSourceTest.php
+++ b/tests/Calendar/CalendarSourceTest.php
@@ -25,17 +25,17 @@ class CalendarSourceTest extends TestCase
$sut->addOption('hello', false);
$sut->addOption('world', 123);
- $this->assertEquals(CalendarSourceType::JSON, $sut->getType());
- $this->assertEquals('json', $sut->getTypeName());
- $this->assertEquals('0815', $sut->getId());
- $this->assertEquals('askdjfhlaksjdhflaksjhdflkjasdlkfjh', $sut->getUri());
- $this->assertEquals('#fffccc', $sut->getColor());
- $this->assertEquals(['foo' => 'bar', 'hello' => false, 'world' => 123], $sut->getOptions());
+ self::assertEquals(CalendarSourceType::JSON, $sut->getType());
+ self::assertEquals('json', $sut->getTypeName());
+ self::assertEquals('0815', $sut->getId());
+ self::assertEquals('askdjfhlaksjdhflaksjhdflkjasdlkfjh', $sut->getUri());
+ self::assertEquals('#fffccc', $sut->getColor());
+ self::assertEquals(['foo' => 'bar', 'hello' => false, 'world' => 123], $sut->getOptions());
$sut = new CalendarSource(CalendarSourceType::TIMESHEET, '0815', 'askdjfhlaksjdhflaksjhdflkjasdlkfjh', null);
- $this->assertEquals('0815', $sut->getId());
- $this->assertEquals('askdjfhlaksjdhflaksjhdflkjasdlkfjh', $sut->getUri());
- $this->assertNull($sut->getColor());
+ self::assertEquals('0815', $sut->getId());
+ self::assertEquals('askdjfhlaksjdhflaksjhdflkjasdlkfjh', $sut->getUri());
+ self::assertNull($sut->getColor());
}
}
diff --git a/tests/Calendar/GoogleSourceTest.php b/tests/Calendar/GoogleSourceTest.php
index ce92e64d..2c500704 100644
--- a/tests/Calendar/GoogleSourceTest.php
+++ b/tests/Calendar/GoogleSourceTest.php
@@ -21,14 +21,14 @@ class GoogleSourceTest extends TestCase
{
$sut = new GoogleSource('0815', 'askdjfhlaksjdhflaksjhdflkjasdlkfjh', '#fffccc');
- $this->assertEquals('0815', $sut->getId());
- $this->assertEquals('askdjfhlaksjdhflaksjhdflkjasdlkfjh', $sut->getUri());
- $this->assertEquals('#fffccc', $sut->getColor());
+ self::assertEquals('0815', $sut->getId());
+ self::assertEquals('askdjfhlaksjdhflaksjhdflkjasdlkfjh', $sut->getUri());
+ self::assertEquals('#fffccc', $sut->getColor());
$sut = new GoogleSource('0815', 'askdjfhlaksjdhflaksjhdflkjasdlkfjh', null);
- $this->assertEquals('0815', $sut->getId());
- $this->assertEquals('askdjfhlaksjdhflaksjhdflkjasdlkfjh', $sut->getUri());
- $this->assertNull($sut->getColor());
+ self::assertEquals('0815', $sut->getId());
+ self::assertEquals('askdjfhlaksjdhflaksjhdflkjasdlkfjh', $sut->getUri());
+ self::assertNull($sut->getColor());
}
}
diff --git a/tests/Calendar/GoogleTest.php b/tests/Calendar/GoogleTest.php
index 0e8d51be..70c7ebb3 100644
--- a/tests/Calendar/GoogleTest.php
+++ b/tests/Calendar/GoogleTest.php
@@ -27,12 +27,12 @@ class GoogleTest extends TestCase
$sut = new Google('qwertzuiop1234567890');
- $this->assertEquals([], $sut->getSources());
- $this->assertEquals('qwertzuiop1234567890', $sut->getApiKey());
+ self::assertEquals([], $sut->getSources());
+ self::assertEquals('qwertzuiop1234567890', $sut->getApiKey());
$sut = new Google('ewa6347865fg908ouhpoihui7f56', $sources);
- $this->assertEquals($sources, $sut->getSources());
- $this->assertEquals('ewa6347865fg908ouhpoihui7f56', $sut->getApiKey());
+ self::assertEquals($sources, $sut->getSources());
+ self::assertEquals('ewa6347865fg908ouhpoihui7f56', $sut->getApiKey());
}
}
diff --git a/tests/Calendar/RecentActivitiesSourceTest.php b/tests/Calendar/RecentActivitiesSourceTest.php
index f651f8e8..41315f83 100644
--- a/tests/Calendar/RecentActivitiesSourceTest.php
+++ b/tests/Calendar/RecentActivitiesSourceTest.php
@@ -25,12 +25,12 @@ class RecentActivitiesSourceTest extends TestCase
$sut = new RecentActivitiesSource($entries);
- $this->assertEquals('calendar/drag-drop.html.twig', $sut->getBlockInclude());
- $this->assertSame($entries, $sut->getEntries());
- $this->assertEquals('POST', $sut->getMethod());
- $this->assertEquals('post_timesheet', $sut->getRoute());
- $this->assertEquals(['full' => 'true'], $sut->getRouteParams());
- $this->assertEquals([], $sut->getRouteReplacer());
- $this->assertEquals('recent.activities', $sut->getTitle());
+ self::assertEquals('calendar/drag-drop.html.twig', $sut->getBlockInclude());
+ self::assertSame($entries, $sut->getEntries());
+ self::assertEquals('POST', $sut->getMethod());
+ self::assertEquals('post_timesheet', $sut->getRoute());
+ self::assertEquals(['full' => 'true'], $sut->getRouteParams());
+ self::assertEquals([], $sut->getRouteReplacer());
+ self::assertEquals('recent.activities', $sut->getTitle());
}
}
diff --git a/tests/Calendar/TimesheetEntryTest.php b/tests/Calendar/TimesheetEntryTest.php
index 035f5f9c..44dcbd98 100644
--- a/tests/Calendar/TimesheetEntryTest.php
+++ b/tests/Calendar/TimesheetEntryTest.php
@@ -41,12 +41,12 @@ class TimesheetEntryTest extends TestCase
$sut = new TimesheetEntry($timesheet, '#cccccc');
- $this->assertEquals('a wonderful activity!!', $sut->getTitle());
- $this->assertEquals('#cccccc', $sut->getColor());
- $this->assertSame($project, $sut->getProject());
- $this->assertSame($activity, $sut->getActivity());
- $this->assertEquals('dd_timesheet', $sut->getBlockName());
- $this->assertEquals($expectedData, $sut->getData());
+ self::assertEquals('a wonderful activity!!', $sut->getTitle());
+ self::assertEquals('#cccccc', $sut->getColor());
+ self::assertSame($project, $sut->getProject());
+ self::assertSame($activity, $sut->getActivity());
+ self::assertEquals('dd_timesheet', $sut->getBlockName());
+ self::assertEquals($expectedData, $sut->getData());
$expectedData = [
'activity' => null,
@@ -57,7 +57,7 @@ class TimesheetEntryTest extends TestCase
$sut = new TimesheetEntry($timesheet, '#cccccc', true);
- $this->assertEquals($expectedData, $sut->getData());
+ self::assertEquals($expectedData, $sut->getData());
}
public function testEmpty(): void
@@ -71,11 +71,11 @@ class TimesheetEntryTest extends TestCase
$sut = new TimesheetEntry($timesheet, '#ddd');
- $this->assertEquals('', $sut->getTitle());
- $this->assertEquals('#ddd', $sut->getColor());
- $this->assertNull($sut->getProject());
- $this->assertNull($sut->getActivity());
- $this->assertEquals($expectedData, $sut->getData());
+ self::assertEquals('', $sut->getTitle());
+ self::assertEquals('#ddd', $sut->getColor());
+ self::assertNull($sut->getProject());
+ self::assertNull($sut->getActivity());
+ self::assertEquals($expectedData, $sut->getData());
}
public function testGetTitle(): void
diff --git a/tests/Command/ActivateUserCommandTest.php b/tests/Command/ActivateUserCommandTest.php
index 759e77f6..e79becac 100644
--- a/tests/Command/ActivateUserCommandTest.php
+++ b/tests/Command/ActivateUserCommandTest.php
@@ -70,7 +70,7 @@ class ActivateUserCommandTest extends KernelTestCase
$commandTester = $this->callCommand('chris_user');
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[OK] User "chris_user" has been activated.', $output);
+ self::assertStringContainsString('[OK] User "chris_user" has been activated.', $output);
$container = self::$kernel->getContainer();
/** @var Registry $doctrine */
@@ -87,7 +87,7 @@ class ActivateUserCommandTest extends KernelTestCase
$commandTester = $this->callCommand('susan_super');
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[WARNING] User "susan_super" is already active.', $output);
+ self::assertStringContainsString('[WARNING] User "susan_super" is already active.', $output);
}
public function testWithMissingUsername(): void
diff --git a/tests/Command/ChangePasswordCommandTest.php b/tests/Command/ChangePasswordCommandTest.php
index 9702a5aa..971ab3cc 100644
--- a/tests/Command/ChangePasswordCommandTest.php
+++ b/tests/Command/ChangePasswordCommandTest.php
@@ -86,7 +86,7 @@ class ChangePasswordCommandTest extends KernelTestCase
$commandTester = $this->callCommand('john_user', '0987654321');
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[OK] Changed password for user "john_user".', $output);
+ self::assertStringContainsString('[OK] Changed password for user "john_user".', $output);
/** @var Registry $doctrine */
$doctrine = self::getContainer()->get('doctrine');
@@ -105,7 +105,7 @@ class ChangePasswordCommandTest extends KernelTestCase
$commandTester = $this->callCommand('john_user', '1');
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[ERROR] plainPassword: This value is too short.', $output);
+ self::assertStringContainsString('[ERROR] plainPassword: This value is too short.', $output);
}
public function testWithMissingUsername(): void
@@ -120,6 +120,6 @@ class ChangePasswordCommandTest extends KernelTestCase
{
$commandTester = $this->callCommand('john_user', null);
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[OK] Changed password for user "john_user".', $output);
+ self::assertStringContainsString('[OK] Changed password for user "john_user".', $output);
}
}
diff --git a/tests/Command/CreateUserCommandTest.php b/tests/Command/CreateUserCommandTest.php
index 66843dc8..a263b321 100644
--- a/tests/Command/CreateUserCommandTest.php
+++ b/tests/Command/CreateUserCommandTest.php
@@ -42,7 +42,7 @@ class CreateUserCommandTest extends KernelTestCase
$commandTester = $this->createUser('MyTestUser', 'user@example.com', 'ROLE_USER', 'foobar');
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[ERROR] plainPassword: This value is too short.', $output);
+ self::assertStringContainsString('[ERROR] plainPassword: This value is too short.', $output);
}
public function testCreateUser(): void
@@ -50,7 +50,7 @@ class CreateUserCommandTest extends KernelTestCase
$commandTester = $this->createUser('MyTestUser', 'user@example.com', 'ROLE_USER', 'foobar12');
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[OK] Success! Created user: MyTestUser', $output);
+ self::assertStringContainsString('[OK] Success! Created user: MyTestUser', $output);
$container = self::$kernel->getContainer();
/** @var Registry $doctrine */
@@ -80,9 +80,9 @@ class CreateUserCommandTest extends KernelTestCase
{
$commandTester = $this->createUser('xx', '', 'ROLE_USER', '');
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[ERROR] email: This value should not be blank', $output);
- $this->assertStringContainsString('[ERROR] plainPassword: This value should not be blank', $output);
- $this->assertStringContainsString('[ERROR] plainPassword: This value is too short.', $output);
+ self::assertStringContainsString('[ERROR] email: This value should not be blank', $output);
+ self::assertStringContainsString('[ERROR] plainPassword: This value should not be blank', $output);
+ self::assertStringContainsString('[ERROR] plainPassword: This value is too short.', $output);
}
public function testUserAlreadyExisting(): void
@@ -91,7 +91,7 @@ class CreateUserCommandTest extends KernelTestCase
$commandTester = $this->createUser('MyTestUser', 'user2@example.com', 'ROLE_USER', 'foobar123');
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[ERROR] username: The username is already used.', $output);
+ self::assertStringContainsString('[ERROR] username: The username is already used.', $output);
}
public function testEmailAlreadyExisting(): void
@@ -100,7 +100,7 @@ class CreateUserCommandTest extends KernelTestCase
$commandTester = $this->createUser('MyTestUser2', 'user@example.com', 'ROLE_USER', 'foobar');
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[ERROR] email: This e-mail address is already in use.', $output);
+ self::assertStringContainsString('[ERROR] email: This e-mail address is already in use.', $output);
}
public function testUserEmail(): void
@@ -108,6 +108,6 @@ class CreateUserCommandTest extends KernelTestCase
$commandTester = $this->createUser('MyTestUser', 'ROLE_USER', 'ROLE_USER', 'foobar12');
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[ERROR] email: This value is not a valid email address', $output);
+ self::assertStringContainsString('[ERROR] email: This value is not a valid email address', $output);
}
}
diff --git a/tests/Command/DeactivateUserCommandTest.php b/tests/Command/DeactivateUserCommandTest.php
index 7cc03327..0a28ca90 100644
--- a/tests/Command/DeactivateUserCommandTest.php
+++ b/tests/Command/DeactivateUserCommandTest.php
@@ -69,7 +69,7 @@ class DeactivateUserCommandTest extends KernelTestCase
$commandTester = $this->callCommand('john_user');
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[OK] User "john_user" has been deactivated.', $output);
+ self::assertStringContainsString('[OK] User "john_user" has been deactivated.', $output);
$container = self::$kernel->getContainer();
/** @var Registry $doctrine */
@@ -86,7 +86,7 @@ class DeactivateUserCommandTest extends KernelTestCase
$commandTester = $this->callCommand('chris_user');
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[WARNING] User "chris_user" is already deactivated.', $output);
+ self::assertStringContainsString('[WARNING] User "chris_user" is already deactivated.', $output);
}
public function testWithMissingUsername(): void
diff --git a/tests/Command/DemoteUserCommandTest.php b/tests/Command/DemoteUserCommandTest.php
index 05c4b1d6..83896fc4 100644
--- a/tests/Command/DemoteUserCommandTest.php
+++ b/tests/Command/DemoteUserCommandTest.php
@@ -79,7 +79,7 @@ class DemoteUserCommandTest extends KernelTestCase
$commandTester = $this->callCommand('tony_teamlead', 'ROLE_TEAMLEAD');
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[OK] Role "ROLE_TEAMLEAD" has been removed from user "tony_teamlead".', $output);
+ self::assertStringContainsString('[OK] Role "ROLE_TEAMLEAD" has been removed from user "tony_teamlead".', $output);
$container = self::$kernel->getContainer();
/** @var Registry $doctrine */
@@ -96,7 +96,7 @@ class DemoteUserCommandTest extends KernelTestCase
$commandTester = $this->callCommand('susan_super', null, true);
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[OK] Super administrator role has been removed from the user "susan_super".', $output);
+ self::assertStringContainsString('[OK] Super administrator role has been removed from the user "susan_super".', $output);
$container = self::$kernel->getContainer();
/** @var Registry $doctrine */
@@ -113,7 +113,7 @@ class DemoteUserCommandTest extends KernelTestCase
$commandTester = $this->callCommand('tony_teamlead', null, true);
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[WARNING] User "tony_teamlead" doesn\'t have the super administrator role.', $output);
+ self::assertStringContainsString('[WARNING] User "tony_teamlead" doesn\'t have the super administrator role.', $output);
}
public function testDemoteAdminFailsOnTeamlead(): void
@@ -121,7 +121,7 @@ class DemoteUserCommandTest extends KernelTestCase
$commandTester = $this->callCommand('tony_teamlead', 'ROLE_ADMIN', false);
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[WARNING] User "tony_teamlead" didn\'t have "ROLE_ADMIN" role.', $output);
+ self::assertStringContainsString('[WARNING] User "tony_teamlead" didn\'t have "ROLE_ADMIN" role.', $output);
}
public function testDemoteRoleAndSuperFails(): void
diff --git a/tests/Command/ExportCreateCommandTest.php b/tests/Command/ExportCreateCommandTest.php
index 63bd9e56..a06368e7 100644
--- a/tests/Command/ExportCreateCommandTest.php
+++ b/tests/Command/ExportCreateCommandTest.php
@@ -122,7 +122,7 @@ class ExportCreateCommandTest extends KernelTestCase
$commandTester = $this->createExport($options);
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[ERROR] ' . $errorMessage, $output);
+ self::assertStringContainsString('[ERROR] ' . $errorMessage, $output);
}
protected function assertCommandResult(array $options = [], string $message = ''): void
@@ -130,7 +130,7 @@ class ExportCreateCommandTest extends KernelTestCase
$commandTester = $this->createExport($options);
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[OK] ' . $message, $output);
+ self::assertStringContainsString('[OK] ' . $message, $output);
}
public function testCreateWithUnknownExportFilter(): void
@@ -179,7 +179,7 @@ class ExportCreateCommandTest extends KernelTestCase
$commandTester = $this->createExport($options);
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[OK] No entries found, skipping', $output);
+ self::assertStringContainsString('[OK] No entries found, skipping', $output);
}
/**
@@ -217,7 +217,7 @@ class ExportCreateCommandTest extends KernelTestCase
$commandTester = $this->createExport(['--template' => 'csv', '--customer' => [$data[0]->getId()], '--start' => $start->format('Y-m-d'), '--end' => $end->format('Y-m-d'), '--username' => UserFixtures::USERNAME_SUPER_ADMIN]);
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('Saved export to: ', $output);
+ self::assertStringContainsString('Saved export to: ', $output);
}
public function testCreateExportByProject(): void
@@ -230,7 +230,7 @@ class ExportCreateCommandTest extends KernelTestCase
$commandTester = $this->createExport(['--template' => 'csv', '--project' => [$data[1][0]->getId()], '--start' => $start->format('Y-m-d'), '--end' => $end->format('Y-m-d')]);
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('Saved export to: ', $output);
+ self::assertStringContainsString('Saved export to: ', $output);
}
public function testCreateExportWithEmail(): void
@@ -252,7 +252,7 @@ class ExportCreateCommandTest extends KernelTestCase
]));
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('Send email with report to: foo@example.com', $output);
- $this->assertStringContainsString('Send email with report to: foo2@example.com', $output);
+ self::assertStringContainsString('Send email with report to: foo@example.com', $output);
+ self::assertStringContainsString('Send email with report to: foo2@example.com', $output);
}
}
diff --git a/tests/Command/InvoiceCreateCommandTest.php b/tests/Command/InvoiceCreateCommandTest.php
index 48a6cd2a..135f8cf9 100644
--- a/tests/Command/InvoiceCreateCommandTest.php
+++ b/tests/Command/InvoiceCreateCommandTest.php
@@ -108,7 +108,7 @@ class InvoiceCreateCommandTest extends KernelTestCase
$commandTester = $this->createInvoice($options);
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[ERROR] ' . $errorMessage, $output);
+ self::assertStringContainsString('[ERROR] ' . $errorMessage, $output);
}
public function testCreateWithUnknownExportFilter(): void
@@ -174,13 +174,13 @@ class InvoiceCreateCommandTest extends KernelTestCase
$commandTester = $this->createInvoice(['--user' => UserFixtures::USERNAME_SUPER_ADMIN, '--customer' => 1, '--template' => 'Invoice', '--start' => '2020-01-01', '--end' => '2020-03-01']);
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('Created 1 invoice(s)', $output);
- $this->assertStringContainsString('| ID', $output);
- $this->assertStringContainsString('| Customer', $output);
- $this->assertStringContainsString('| Total', $output);
- $this->assertStringContainsString('| Filename', $output);
- $this->assertStringContainsString('0 EUR', $output);
- $this->assertStringContainsString('/tests/_data/invoices/' . ((new \DateTime())->format('Y')) . '-001-Test.html |', $output);
+ self::assertStringContainsString('Created 1 invoice(s)', $output);
+ self::assertStringContainsString('| ID', $output);
+ self::assertStringContainsString('| Customer', $output);
+ self::assertStringContainsString('| Total', $output);
+ self::assertStringContainsString('| Filename', $output);
+ self::assertStringContainsString('0 EUR', $output);
+ self::assertStringContainsString('/tests/_data/invoices/' . ((new \DateTime())->format('Y')) . '-001-Test.html |', $output);
}
/**
@@ -224,7 +224,7 @@ class InvoiceCreateCommandTest extends KernelTestCase
$commandTester = $this->createInvoice(['--user' => UserFixtures::USERNAME_SUPER_ADMIN, '--by-customer' => null, '--start' => $start->format('Y-m-d'), '--end' => $end->format('Y-m-d')]);
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('Created 1 invoice(s) ', $output);
+ self::assertStringContainsString('Created 1 invoice(s) ', $output);
}
public function testCreateInvoiceByCustomerId(): void
@@ -238,7 +238,7 @@ class InvoiceCreateCommandTest extends KernelTestCase
$commandTester = $this->createInvoice(['--user' => UserFixtures::USERNAME_SUPER_ADMIN, '--customer' => $customer . ',1', '--start' => $start->format('Y-m-d'), '--end' => $end->format('Y-m-d')]);
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('Created 1 invoice(s) ', $output);
+ self::assertStringContainsString('Created 1 invoice(s) ', $output);
}
public function testCreateInvoiceByProject(): void
@@ -251,7 +251,7 @@ class InvoiceCreateCommandTest extends KernelTestCase
$commandTester = $this->createInvoice(['--user' => UserFixtures::USERNAME_SUPER_ADMIN, '--exported' => 'all', '--by-project' => null, '--start' => $start->format('Y-m-d'), '--end' => $end->format('Y-m-d')]);
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('Created 1 invoice(s) ', $output);
+ self::assertStringContainsString('Created 1 invoice(s) ', $output);
}
public function testCreateInvoiceByProjectId(): void
@@ -264,7 +264,7 @@ class InvoiceCreateCommandTest extends KernelTestCase
$commandTester = $this->createInvoice(['--user' => UserFixtures::USERNAME_SUPER_ADMIN, '--exported' => 'all', '--project' => '1', '--template' => 'Invoice', '--start' => $start->format('Y-m-d'), '--end' => $end->format('Y-m-d')]);
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('Created 1 invoice(s) ', $output);
+ self::assertStringContainsString('Created 1 invoice(s) ', $output);
}
public function testCreateInvoiceByProjectWithPreview(): void
@@ -277,6 +277,6 @@ class InvoiceCreateCommandTest extends KernelTestCase
$commandTester = $this->createInvoice(['--user' => UserFixtures::USERNAME_SUPER_ADMIN, '--exported' => 'all', '--preview' => sys_get_temp_dir(), '--by-project' => null, '--start' => $start->format('Y-m-d'), '--end' => $end->format('Y-m-d')]);
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('Created 1 invoice(s) ', $output);
+ self::assertStringContainsString('Created 1 invoice(s) ', $output);
}
}
diff --git a/tests/Command/ListUserCommandTest.php b/tests/Command/ListUserCommandTest.php
index 92ecffd2..b20f1ad2 100644
--- a/tests/Command/ListUserCommandTest.php
+++ b/tests/Command/ListUserCommandTest.php
@@ -25,8 +25,8 @@ class ListUserCommandTest extends KernelTestCase
{
$commandTester = $this->getCommandTester();
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('Username Email Roles Active Authenticator', $output);
- $this->assertStringContainsString('---------- ------- ------- -------- -------------', $output);
+ self::assertStringContainsString('Username Email Roles Active Authenticator', $output);
+ self::assertStringContainsString('---------- ------- ------- -------- -------------', $output);
}
protected function getCommandTester(): CommandTester
diff --git a/tests/Command/PluginCommandTest.php b/tests/Command/PluginCommandTest.php
index 8561fae5..3ceb6ce8 100644
--- a/tests/Command/PluginCommandTest.php
+++ b/tests/Command/PluginCommandTest.php
@@ -33,9 +33,9 @@ class PluginCommandTest extends KernelTestCase
$commandTester = $this->getCommandTester([$plugin1], []);
$output = $commandTester->getDisplay();
- $this->assertStringContainsString(__DIR__, $output);
- $this->assertStringContainsString('Plugin/Fixtures/TestPlugin', $output);
- $this->assertStringContainsString('TestPlugin from composer.json', $output);
+ self::assertStringContainsString(__DIR__, $output);
+ self::assertStringContainsString('Plugin/Fixtures/TestPlugin', $output);
+ self::assertStringContainsString('TestPlugin from composer.json', $output);
}
private function getCommandTester(array $plugins, array $options = []): CommandTester
diff --git a/tests/Command/PromoteUserCommandTest.php b/tests/Command/PromoteUserCommandTest.php
index 0a1a7c69..af873ff3 100644
--- a/tests/Command/PromoteUserCommandTest.php
+++ b/tests/Command/PromoteUserCommandTest.php
@@ -36,7 +36,7 @@ class PromoteUserCommandTest extends KernelTestCase
$container = self::$kernel->getContainer();
$userService = $container->get(UserService::class);
- $this->assertInstanceOf(UserService::class, $userService);
+ self::assertInstanceOf(UserService::class, $userService);
$this->application->add(new PromoteUserCommand($userService));
}
@@ -79,7 +79,7 @@ class PromoteUserCommandTest extends KernelTestCase
$commandTester = $this->callCommand('john_user', 'ROLE_TEAMLEAD');
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[OK] Role "ROLE_TEAMLEAD" has been added to user "john_user".', $output);
+ self::assertStringContainsString('[OK] Role "ROLE_TEAMLEAD" has been added to user "john_user".', $output);
$container = self::$kernel->getContainer();
/** @var Registry $doctrine */
@@ -96,7 +96,7 @@ class PromoteUserCommandTest extends KernelTestCase
$commandTester = $this->callCommand('john_user', null, true);
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[OK] User "john_user" has been promoted as a super administrator.', $output);
+ self::assertStringContainsString('[OK] User "john_user" has been promoted as a super administrator.', $output);
$container = self::$kernel->getContainer();
/** @var Registry $doctrine */
@@ -113,7 +113,7 @@ class PromoteUserCommandTest extends KernelTestCase
$commandTester = $this->callCommand('susan_super', null, true);
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[WARNING] User "susan_super" does already have the super administrator role.', $output);
+ self::assertStringContainsString('[WARNING] User "susan_super" does already have the super administrator role.', $output);
}
public function testPromoteTeamleadFailsOnTeamlead(): void
@@ -121,7 +121,7 @@ class PromoteUserCommandTest extends KernelTestCase
$commandTester = $this->callCommand('tony_teamlead', 'ROLE_TEAMLEAD', false);
$output = $commandTester->getDisplay();
- $this->assertStringContainsString('[WARNING] User "tony_teamlead" did already have "ROLE_TEAMLEAD" role.', $output);
+ self::assertStringContainsString('[WARNING] User "tony_teamlead" did already have "ROLE_TEAMLEAD" role.', $output);
}
public function testPromoteRoleAndSuperFails(): void
diff --git a/tests/Command/VersionCommandTest.php b/tests/Command/VersionCommandTest.php
index bb797eb8..05f686d3 100644
--- a/tests/Command/VersionCommandTest.php
+++ b/tests/Command/VersionCommandTest.php
@@ -39,10 +39,10 @@ class VersionCommandTest extends KernelTestCase
{
$commandTester = $this->getCommandTester($options);
$output = $commandTester->getDisplay();
- $this->assertEquals($result . PHP_EOL, $output);
+ self::assertEquals($result . PHP_EOL, $output);
}
- public function getTestData(): array // @phpstan-ignore missingType.iterableValue
+ public static function getTestData(): array // @phpstan-ignore missingType.iterableValue
{
return [
[[], 'Kimai ' . Constants::VERSION . ' by Kevin Papst.'],
diff --git a/tests/Configuration/LdapConfigurationTest.php b/tests/Configuration/LdapConfigurationTest.php
index d0e787b9..1c1ae76b 100644
--- a/tests/Configuration/LdapConfigurationTest.php
+++ b/tests/Configuration/LdapConfigurationTest.php
@@ -45,18 +45,18 @@ class LdapConfigurationTest extends TestCase
public function testDefault(): void
{
$sut = $this->getSut([]);
- $this->assertFalse($sut->isActivated());
- $this->assertEquals([], $sut->getUserParameters());
- $this->assertEquals([], $sut->getRoleParameters());
- $this->assertEquals([], $sut->getConnectionParameters());
+ self::assertFalse($sut->isActivated());
+ self::assertEquals([], $sut->getUserParameters());
+ self::assertEquals([], $sut->getRoleParameters());
+ self::assertEquals([], $sut->getConnectionParameters());
}
public function testMapping(): void
{
$sut = $this->getSut($this->getDefaultSettings());
- $this->assertTrue($sut->isActivated());
- $this->assertEquals(['foo' => 'bar'], $sut->getUserParameters());
- $this->assertEquals(['bar' => 'foo'], $sut->getRoleParameters());
- $this->assertEquals(['host' => '1.2.3.4'], $sut->getConnectionParameters());
+ self::assertTrue($sut->isActivated());
+ self::assertEquals(['foo' => 'bar'], $sut->getUserParameters());
+ self::assertEquals(['bar' => 'foo'], $sut->getRoleParameters());
+ self::assertEquals(['host' => '1.2.3.4'], $sut->getConnectionParameters());
}
}
diff --git a/tests/Configuration/LocaleServiceTest.php b/tests/Configuration/LocaleServiceTest.php
index d7818af3..094ee93c 100644
--- a/tests/Configuration/LocaleServiceTest.php
+++ b/tests/Configuration/LocaleServiceTest.php
@@ -106,10 +106,10 @@ class LocaleServiceTest extends TestCase
public function testGetAllLocales(): void
{
$sut = $this->getSut([]);
- $this->assertEquals([], $sut->getAllLocales());
+ self::assertEquals([], $sut->getAllLocales());
$sut = $this->getSut($this->getDefaultSettings());
- $this->assertEquals(['de', 'en', 'en_AU', 'pt_BR', 'it', 'fr', 'fr_BE', 'fr_CA', 'es', 'ru', 'ar', 'hu'], $sut->getAllLocales());
+ self::assertEquals(['de', 'en', 'en_AU', 'pt_BR', 'it', 'fr', 'fr_BE', 'fr_CA', 'es', 'ru', 'ar', 'hu'], $sut->getAllLocales());
}
public function testInvalidLocaleWithGivenLocale(): void
@@ -124,26 +124,26 @@ class LocaleServiceTest extends TestCase
public function testGetDurationFormat(): void
{
$sut = $this->getSut($this->getDefaultSettings());
- $this->assertEquals('%h:%m', $sut->getDurationFormat('de'));
+ self::assertEquals('%h:%m', $sut->getDurationFormat('de'));
}
public function testGetDateFormat(): void
{
$sut = $this->getSut($this->getDefaultSettings());
- $this->assertEquals('d.m.Y', $sut->getDateFormat('de'));
+ self::assertEquals('d.m.Y', $sut->getDateFormat('de'));
}
public function testGetDateTimeFormat(): void
{
$sut = $this->getSut($this->getDefaultSettings());
- $this->assertEquals('d.m.Y H:i', $sut->getDateTimeFormat('de'));
+ self::assertEquals('d.m.Y H:i', $sut->getDateTimeFormat('de'));
}
public function testGetTimeFormat(): void
{
$sut = $this->getSut($this->getDefaultSettings());
- $this->assertEquals('H:i', $sut->getTimeFormat('de'));
- $this->assertEquals('H:i:s', $sut->getTimeFormat('en'));
+ self::assertEquals('H:i', $sut->getTimeFormat('de'));
+ self::assertEquals('H:i:s', $sut->getTimeFormat('en'));
}
/**
@@ -153,13 +153,13 @@ class LocaleServiceTest extends TestCase
{
$sut = $this->getSut($this->getDefaultSettings());
$actual = $sut->getNearestTranslationLocale($locale);
- $this->assertEquals($expected, $actual);
+ self::assertEquals($expected, $actual);
}
/**
* @return array>
*/
- public function getNearestTranslationLocaleData(): array
+ public static function getNearestTranslationLocaleData(): array
{
return [
['de', 'de'], // registered and translated: use it
diff --git a/tests/Configuration/SamlConfigurationTest.php b/tests/Configuration/SamlConfigurationTest.php
index 74396c78..013b2e73 100644
--- a/tests/Configuration/SamlConfigurationTest.php
+++ b/tests/Configuration/SamlConfigurationTest.php
@@ -53,31 +53,31 @@ class SamlConfigurationTest extends TestCase
public function testDefault(): void
{
$sut = $this->getSut([]);
- $this->assertFalse($sut->isActivated());
- $this->assertEquals('', $sut->getTitle());
- $this->assertEquals([], $sut->getConnection());
- $this->assertEquals([], $sut->getRolesMapping());
- $this->assertEquals('', $sut->getRolesAttribute());
- $this->assertEquals([], $sut->getAttributeMapping());
- $this->assertFalse($sut->isRolesResetOnLogin());
+ self::assertFalse($sut->isActivated());
+ self::assertEquals('', $sut->getTitle());
+ self::assertEquals([], $sut->getConnection());
+ self::assertEquals([], $sut->getRolesMapping());
+ self::assertEquals('', $sut->getRolesAttribute());
+ self::assertEquals([], $sut->getAttributeMapping());
+ self::assertFalse($sut->isRolesResetOnLogin());
}
public function testDefaultSettings(): void
{
$sut = $this->getSut($this->getDefaultSettings());
- $this->assertTrue($sut->isActivated());
- $this->assertTrue($sut->isRolesResetOnLogin());
- $this->assertEquals('SAML title', $sut->getTitle());
- $this->assertEquals('google', $sut->getProvider());
- $this->assertEquals([
+ self::assertTrue($sut->isActivated());
+ self::assertTrue($sut->isRolesResetOnLogin());
+ self::assertEquals('SAML title', $sut->getTitle());
+ self::assertEquals('google', $sut->getProvider());
+ self::assertEquals([
'host' => '1.2.3.4',
], $sut->getConnection());
- $this->assertEquals([
+ self::assertEquals([
['saml' => 'Kimai - Admin', 'kimai' => 'ROLE_SUPER_ADMIN'],
['saml' => 'Management', 'kimai' => 'ROLE_TEAMLEAD'],
], $sut->getRolesMapping());
- $this->assertEquals('Roles', $sut->getRolesAttribute());
- $this->assertEquals([
+ self::assertEquals('Roles', $sut->getRolesAttribute());
+ self::assertEquals([
['saml' => '$Email', 'kimai' => 'email'],
['saml' => '$FirstName $LastName', 'kimai' => 'alias'],
], $sut->getAttributeMapping());
diff --git a/tests/Configuration/SystemConfigurationTest.php b/tests/Configuration/SystemConfigurationTest.php
index 9de6fae0..fb038615 100644
--- a/tests/Configuration/SystemConfigurationTest.php
+++ b/tests/Configuration/SystemConfigurationTest.php
@@ -132,22 +132,22 @@ class SystemConfigurationTest extends TestCase
public function testDefaultWithoutLoader(): void
{
$sut = $this->getSut($this->getDefaultSettings(), []);
- $this->assertEquals('Europe/London', $sut->find('defaults.customer.timezone'));
- $this->assertEquals('GBP', $sut->find('defaults.customer.currency'));
- $this->assertFalse($sut->find('timesheet.rules.allow_future_times'));
- $this->assertEquals(99, $sut->find('timesheet.active_entries.hard_limit'));
- $this->assertEquals('Maroon|#800000,Brown|#a52a2a,Red|#ff0000,Orange|#ffa500,#ffffff,,|#000000', $sut->getThemeColorChoices());
- $this->assertEquals(['Maroon' => '#800000', 'Brown' => '#a52a2a', 'Red' => '#ff0000', 'Orange' => '#ffa500', '#ffffff' => '#ffffff', '#000000' => '#000000'], $sut->getThemeColors());
+ self::assertEquals('Europe/London', $sut->find('defaults.customer.timezone'));
+ self::assertEquals('GBP', $sut->find('defaults.customer.currency'));
+ self::assertFalse($sut->find('timesheet.rules.allow_future_times'));
+ self::assertEquals(99, $sut->find('timesheet.active_entries.hard_limit'));
+ self::assertEquals('Maroon|#800000,Brown|#a52a2a,Red|#ff0000,Orange|#ffa500,#ffffff,,|#000000', $sut->getThemeColorChoices());
+ self::assertEquals(['Maroon' => '#800000', 'Brown' => '#a52a2a', 'Red' => '#ff0000', 'Orange' => '#ffa500', '#ffffff' => '#ffffff', '#000000' => '#000000'], $sut->getThemeColors());
}
public function testDefaultWithLoader(): void
{
$sut = $this->getSut($this->getDefaultSettings(), $this->getDefaultLoaderSettings());
- $this->assertEquals('Russia/Moscov', $sut->find('defaults.customer.timezone'));
- $this->assertEquals('RUB', $sut->find('defaults.customer.currency'));
- $this->assertTrue($sut->find('timesheet.rules.allow_future_times'));
- $this->assertEquals(7, $sut->find('timesheet.active_entries.hard_limit'));
- $this->assertFalse($sut->isSamlActive());
+ self::assertEquals('Russia/Moscov', $sut->find('defaults.customer.timezone'));
+ self::assertEquals('RUB', $sut->find('defaults.customer.currency'));
+ self::assertTrue($sut->find('timesheet.rules.allow_future_times'));
+ self::assertEquals(7, $sut->find('timesheet.active_entries.hard_limit'));
+ self::assertFalse($sut->isSamlActive());
}
public function testDefaultWithMixedConfigs(): void
@@ -158,11 +158,11 @@ class SystemConfigurationTest extends TestCase
(new Configuration())->setName('theme.color_choices')->setValue(''),
(new Configuration())->setName('company.financial_year')->setValue('2020-03-27'),
]);
- $this->assertFalse($sut->find('timesheet.rules.allow_future_times'));
- $this->assertTrue($sut->isSamlActive());
- $this->assertEquals('Silver|#c0c0c0', $sut->getThemeColorChoices());
- $this->assertEquals(['Silver' => '#c0c0c0'], $sut->getThemeColors());
- $this->assertEquals('2020-03-27', $sut->getFinancialYearStart());
+ self::assertFalse($sut->find('timesheet.rules.allow_future_times'));
+ self::assertTrue($sut->isSamlActive());
+ self::assertEquals('Silver|#c0c0c0', $sut->getThemeColorChoices());
+ self::assertEquals(['Silver' => '#c0c0c0'], $sut->getThemeColors());
+ self::assertEquals('2020-03-27', $sut->getFinancialYearStart());
}
public function testUnknownConfigs(): void
@@ -170,100 +170,100 @@ class SystemConfigurationTest extends TestCase
$sut = $this->getSut($this->getDefaultSettings(), [
(new Configuration())->setName('timesheet.foo')->setValue('hello'),
]);
- $this->assertEquals('hello', $sut->find('timesheet.foo'));
- $this->assertTrue($sut->has('timesheet.foo'));
- $this->assertFalse($sut->has('timesheet.yyyyyyyyy'));
- $this->assertFalse($sut->has('xxxxxxxx.yyyyyyyyy'));
- $this->assertNull($sut->find('xxxxxxxx.yyyyyyyyy'));
+ self::assertEquals('hello', $sut->find('timesheet.foo'));
+ self::assertTrue($sut->has('timesheet.foo'));
+ self::assertFalse($sut->has('timesheet.yyyyyyyyy'));
+ self::assertFalse($sut->has('xxxxxxxx.yyyyyyyyy'));
+ self::assertNull($sut->find('xxxxxxxx.yyyyyyyyy'));
$sut->set('xxxxxxxx.yyyyyyyyy', 'foooo-bar!');
- $this->assertTrue($sut->has('xxxxxxxx.yyyyyyyyy'));
- $this->assertEquals('foooo-bar!', $sut->find('xxxxxxxx.yyyyyyyyy'));
+ self::assertTrue($sut->has('xxxxxxxx.yyyyyyyyy'));
+ self::assertEquals('foooo-bar!', $sut->find('xxxxxxxx.yyyyyyyyy'));
}
public function testCalendarWithoutLoader(): void
{
$sut = $this->getSut($this->getDefaultSettings(), []);
- $this->assertEquals('07:49', $sut->getCalendarBusinessTimeBegin());
- $this->assertEquals('19:27', $sut->getCalendarBusinessTimeEnd());
- $this->assertEquals('06:00:00', $sut->getCalendarTimeframeBegin());
- $this->assertEquals('21:00:43', $sut->getCalendarTimeframeEnd());
- $this->assertEquals('01:11:00', $sut->getCalendarSlotDuration());
- $this->assertEquals(20, $sut->getCalendarDayLimit());
- $this->assertFalse($sut->isCalendarShowWeekNumbers());
- $this->assertTrue($sut->isCalendarShowWeekends());
+ self::assertEquals('07:49', $sut->getCalendarBusinessTimeBegin());
+ self::assertEquals('19:27', $sut->getCalendarBusinessTimeEnd());
+ self::assertEquals('06:00:00', $sut->getCalendarTimeframeBegin());
+ self::assertEquals('21:00:43', $sut->getCalendarTimeframeEnd());
+ self::assertEquals('01:11:00', $sut->getCalendarSlotDuration());
+ self::assertEquals(20, $sut->getCalendarDayLimit());
+ self::assertFalse($sut->isCalendarShowWeekNumbers());
+ self::assertTrue($sut->isCalendarShowWeekends());
- $this->assertEquals('wertwertwegsdfbdf243w567fg8ihuon', $sut->getCalendarGoogleApiKey());
+ self::assertEquals('wertwertwegsdfbdf243w567fg8ihuon', $sut->getCalendarGoogleApiKey());
$sources = $sut->getCalendarGoogleSources();
- $this->assertEquals(2, \count($sources));
+ self::assertEquals(2, \count($sources));
}
public function testCalendarWithLoader(): void
{
$sut = $this->getSut($this->getDefaultSettings(), $this->getDefaultLoaderSettings());
- $this->assertEquals('00:30:00', $sut->getCalendarSlotDuration());
+ self::assertEquals('00:30:00', $sut->getCalendarSlotDuration());
$sources = $sut->getCalendarGoogleSources();
- $this->assertEquals(2, \count($sources));
+ self::assertEquals(2, \count($sources));
}
public function testFormDefaultWithoutLoader(): void
{
$sut = $this->getSut($this->getDefaultSettings(), []);
- $this->assertEquals('Europe/London', $sut->getCustomerDefaultTimezone());
- $this->assertEquals('GBP', $sut->getCustomerDefaultCurrency());
- $this->assertEquals('FR', $sut->getCustomerDefaultCountry());
- $this->assertEquals('foo/bar', $sut->getUserDefaultTimezone());
- $this->assertEquals('blue', $sut->getUserDefaultTheme());
- $this->assertEquals('IT', $sut->getUserDefaultLanguage());
- $this->assertEquals('USD', $sut->getUserDefaultCurrency());
- $this->assertNull($sut->getFinancialYearStart());
+ self::assertEquals('Europe/London', $sut->getCustomerDefaultTimezone());
+ self::assertEquals('GBP', $sut->getCustomerDefaultCurrency());
+ self::assertEquals('FR', $sut->getCustomerDefaultCountry());
+ self::assertEquals('foo/bar', $sut->getUserDefaultTimezone());
+ self::assertEquals('blue', $sut->getUserDefaultTheme());
+ self::assertEquals('IT', $sut->getUserDefaultLanguage());
+ self::assertEquals('USD', $sut->getUserDefaultCurrency());
+ self::assertNull($sut->getFinancialYearStart());
}
public function testFormDefaultWithLoader(): void
{
$sut = $this->getSut($this->getDefaultSettings(), $this->getDefaultLoaderSettings());
- $this->assertEquals('Russia/Moscov', $sut->getCustomerDefaultTimezone());
- $this->assertEquals('RUB', $sut->getCustomerDefaultCurrency());
- $this->assertEquals('FR', $sut->getCustomerDefaultCountry());
- $this->assertEquals('foo/bar', $sut->getUserDefaultTimezone());
- $this->assertEquals('blue', $sut->getUserDefaultTheme());
- $this->assertEquals('IT', $sut->getUserDefaultLanguage());
- $this->assertEquals('USD', $sut->getUserDefaultCurrency());
+ self::assertEquals('Russia/Moscov', $sut->getCustomerDefaultTimezone());
+ self::assertEquals('RUB', $sut->getCustomerDefaultCurrency());
+ self::assertEquals('FR', $sut->getCustomerDefaultCountry());
+ self::assertEquals('foo/bar', $sut->getUserDefaultTimezone());
+ self::assertEquals('blue', $sut->getUserDefaultTheme());
+ self::assertEquals('IT', $sut->getUserDefaultLanguage());
+ self::assertEquals('USD', $sut->getUserDefaultCurrency());
}
public function testTimesheetWithoutLoader(): void
{
$sut = $this->getSut($this->getDefaultSettings(), []);
- $this->assertEquals(99, $sut->getTimesheetActiveEntriesHardLimit());
- $this->assertFalse($sut->isTimesheetAllowFutureTimes());
- $this->assertFalse($sut->isTimesheetMarkdownEnabled());
- $this->assertEquals('punch', $sut->getTimesheetTrackingMode());
- $this->assertEquals('now', $sut->getTimesheetDefaultBeginTime());
- $this->assertEquals('', $sut->isTimesheetAllowOverlappingRecords());
- $this->assertEquals('', $sut->getTimesheetDefaultRoundingDays());
- $this->assertEquals('', $sut->getTimesheetDefaultRoundingMode());
- $this->assertEquals(0, $sut->getTimesheetDefaultRoundingDuration());
- $this->assertEquals(0, $sut->getTimesheetDefaultRoundingEnd());
- $this->assertEquals(0, $sut->getTimesheetDefaultRoundingBegin());
- $this->assertEquals(10, $sut->getTimesheetIncrementDuration());
- $this->assertEquals(5, $sut->getTimesheetIncrementMinutes());
+ self::assertEquals(99, $sut->getTimesheetActiveEntriesHardLimit());
+ self::assertFalse($sut->isTimesheetAllowFutureTimes());
+ self::assertFalse($sut->isTimesheetMarkdownEnabled());
+ self::assertEquals('punch', $sut->getTimesheetTrackingMode());
+ self::assertEquals('now', $sut->getTimesheetDefaultBeginTime());
+ self::assertEquals('', $sut->isTimesheetAllowOverlappingRecords());
+ self::assertEquals('', $sut->getTimesheetDefaultRoundingDays());
+ self::assertEquals('', $sut->getTimesheetDefaultRoundingMode());
+ self::assertEquals(0, $sut->getTimesheetDefaultRoundingDuration());
+ self::assertEquals(0, $sut->getTimesheetDefaultRoundingEnd());
+ self::assertEquals(0, $sut->getTimesheetDefaultRoundingBegin());
+ self::assertEquals(10, $sut->getTimesheetIncrementDuration());
+ self::assertEquals(5, $sut->getTimesheetIncrementMinutes());
}
public function testTimesheetWithLoader(): void
{
$sut = $this->getSut($this->getDefaultSettings(), $this->getDefaultLoaderSettings());
- $this->assertEquals(7, $sut->getTimesheetActiveEntriesHardLimit());
- $this->assertTrue($sut->isTimesheetAllowFutureTimes());
- $this->assertTrue($sut->isTimesheetMarkdownEnabled());
- $this->assertEquals('default', $sut->getTimesheetTrackingMode());
- $this->assertEquals('07:00', $sut->getTimesheetDefaultBeginTime());
- $this->assertEquals('', $sut->isTimesheetAllowOverlappingRecords());
- $this->assertEquals('', $sut->getTimesheetDefaultRoundingDays());
- $this->assertEquals('', $sut->getTimesheetDefaultRoundingMode());
- $this->assertEquals(0, $sut->getTimesheetDefaultRoundingDuration());
- $this->assertEquals(0, $sut->getTimesheetDefaultRoundingEnd());
- $this->assertEquals(0, $sut->getTimesheetDefaultRoundingBegin());
- $this->assertEquals(10, $sut->getTimesheetIncrementDuration());
- $this->assertEquals(5, $sut->getTimesheetIncrementMinutes());
+ self::assertEquals(7, $sut->getTimesheetActiveEntriesHardLimit());
+ self::assertTrue($sut->isTimesheetAllowFutureTimes());
+ self::assertTrue($sut->isTimesheetMarkdownEnabled());
+ self::assertEquals('default', $sut->getTimesheetTrackingMode());
+ self::assertEquals('07:00', $sut->getTimesheetDefaultBeginTime());
+ self::assertEquals('', $sut->isTimesheetAllowOverlappingRecords());
+ self::assertEquals('', $sut->getTimesheetDefaultRoundingDays());
+ self::assertEquals('', $sut->getTimesheetDefaultRoundingMode());
+ self::assertEquals(0, $sut->getTimesheetDefaultRoundingDuration());
+ self::assertEquals(0, $sut->getTimesheetDefaultRoundingEnd());
+ self::assertEquals(0, $sut->getTimesheetDefaultRoundingBegin());
+ self::assertEquals(10, $sut->getTimesheetIncrementDuration());
+ self::assertEquals(5, $sut->getTimesheetIncrementMinutes());
}
}
diff --git a/tests/Controller/AboutControllerTest.php b/tests/Controller/AboutControllerTest.php
index ddfe0e80..e498d9cd 100644
--- a/tests/Controller/AboutControllerTest.php
+++ b/tests/Controller/AboutControllerTest.php
@@ -14,7 +14,7 @@ use App\Entity\User;
/**
* @group integration
*/
-class AboutControllerTest extends ControllerBaseTest
+class AboutControllerTest extends AbstractControllerBaseTestCase
{
public function testIndexAction(): void
{
diff --git a/tests/Controller/ControllerBaseTest.php b/tests/Controller/AbstractControllerBaseTestCase.php
similarity index 99%
rename from tests/Controller/ControllerBaseTest.php
rename to tests/Controller/AbstractControllerBaseTestCase.php
index 1804c0a2..f944a9fd 100644
--- a/tests/Controller/ControllerBaseTest.php
+++ b/tests/Controller/AbstractControllerBaseTestCase.php
@@ -34,7 +34,7 @@ use Symfony\Component\Security\Csrf\CsrfTokenManager;
/**
* ControllerBaseTest adds some useful functions for writing integration tests.
*/
-abstract class ControllerBaseTest extends WebTestCase
+abstract class AbstractControllerBaseTestCase extends WebTestCase
{
use KernelTestTrait;
@@ -155,6 +155,9 @@ abstract class ControllerBaseTest extends WebTestCase
return $client;
}
+ /**
+ * @return non-empty-string
+ */
protected function createUrl(string $url): string
{
$prefix = '/' . self::DEFAULT_LANGUAGE;
@@ -404,10 +407,6 @@ abstract class ControllerBaseTest extends WebTestCase
}
}
- /**
- * @param HttpKernelBrowser $client
- * @param string $url
- */
protected function assertIsRedirect(HttpKernelBrowser $client, ?string $url = null, bool $endsWith = true): void
{
self::assertResponseRedirects();
@@ -431,7 +430,7 @@ abstract class ControllerBaseTest extends WebTestCase
self::assertStringContainsString($expectedMeta, $client->getResponse()->getContent());
if ($url !== null) {
- if ($endsWith) {
+ if ($endsWith && $url !== '') {
self::assertStringEndsWith($url, $location, 'Redirect URL does not match');
} else {
self::assertStringContainsString($url, $location, 'Redirect URL does not match');
@@ -447,7 +446,7 @@ abstract class ControllerBaseTest extends WebTestCase
$location = $client->getResponse()->headers->get('Location');
self::assertNotNull($location);
- if ($endsWith) {
+ if ($endsWith && $url !== '') {
self::assertStringEndsWith($url, $location, 'Redirect URL does not match');
} else {
self::assertStringContainsString($url, $location, 'Redirect URL does not match');
diff --git a/tests/Controller/ActivityControllerTest.php b/tests/Controller/ActivityControllerTest.php
index 040a0972..48a47983 100644
--- a/tests/Controller/ActivityControllerTest.php
+++ b/tests/Controller/ActivityControllerTest.php
@@ -26,7 +26,7 @@ use Symfony\Component\HttpKernel\HttpKernelBrowser;
/**
* @group integration
*/
-class ActivityControllerTest extends ControllerBaseTest
+class ActivityControllerTest extends AbstractControllerBaseTestCase
{
public function testIsSecure(): void
{
@@ -88,7 +88,7 @@ class ActivityControllerTest extends ControllerBaseTest
'page' => 1,
]);
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$this->assertHasDataTable($client);
$this->assertDataTableRowCount($client, 'datatable_activity_admin', 5);
}
@@ -215,7 +215,7 @@ class ActivityControllerTest extends ControllerBaseTest
$this->request($client, '/admin/activity/' . $id . '/edit');
$editForm = $client->getCrawler()->filter('form[name=activity_edit_form]')->form();
- $this->assertEquals('An AcTiVitY Name', $editForm->get('activity_edit_form[name]')->getValue());
+ self::assertEquals('An AcTiVitY Name', $editForm->get('activity_edit_form[name]')->getValue());
}
public function testCreateActionShowsMetaFields(): void
@@ -225,12 +225,12 @@ class ActivityControllerTest extends ControllerBaseTest
static::assertInstanceOf(EventDispatcher::class, $eventDispatcher);
$eventDispatcher->addSubscriber(new ActivityTestMetaFieldSubscriberMock());
$this->assertAccessIsGranted($client, '/admin/activity/create');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$form = $client->getCrawler()->filter('form[name=activity_edit_form]')->form();
- $this->assertTrue($form->has('activity_edit_form[metaFields][metatestmock][value]'));
- $this->assertTrue($form->has('activity_edit_form[metaFields][foobar][value]'));
- $this->assertFalse($form->has('activity_edit_form[metaFields][0][value]'));
+ self::assertTrue($form->has('activity_edit_form[metaFields][metatestmock][value]'));
+ self::assertTrue($form->has('activity_edit_form[metaFields][foobar][value]'));
+ self::assertFalse($form->has('activity_edit_form[metaFields][0][value]'));
}
public function testEditAction(): void
@@ -238,7 +238,7 @@ class ActivityControllerTest extends ControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_ADMIN);
$this->assertAccessIsGranted($client, '/admin/activity/1/edit');
$form = $client->getCrawler()->filter('form[name=activity_edit_form]')->form();
- $this->assertEquals('Test', $form->get('activity_edit_form[name]')->getValue());
+ self::assertEquals('Test', $form->get('activity_edit_form[name]')->getValue());
$client->submit($form, [
'activity_edit_form' => ['name' => 'Test 2']
]);
@@ -246,7 +246,7 @@ class ActivityControllerTest extends ControllerBaseTest
$client->followRedirect();
$this->request($client, '/admin/activity/1/edit');
$editForm = $client->getCrawler()->filter('form[name=activity_edit_form]')->form();
- $this->assertEquals('Test 2', $editForm->get('activity_edit_form[name]')->getValue());
+ self::assertEquals('Test 2', $editForm->get('activity_edit_form[name]')->getValue());
}
public function testEditActionForGlobalActivity(): void
@@ -254,7 +254,7 @@ class ActivityControllerTest extends ControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_ADMIN);
$this->assertAccessIsGranted($client, '/admin/activity/1/edit');
$form = $client->getCrawler()->filter('form[name=activity_edit_form]')->form();
- $this->assertEquals('Test', $form->get('activity_edit_form[name]')->getValue());
+ self::assertEquals('Test', $form->get('activity_edit_form[name]')->getValue());
$client->submit($form, [
'activity_edit_form' => ['name' => 'Test 2']
]);
@@ -262,7 +262,7 @@ class ActivityControllerTest extends ControllerBaseTest
$client->followRedirect();
$this->request($client, '/admin/activity/1/edit');
$editForm = $client->getCrawler()->filter('form[name=activity_edit_form]')->form();
- $this->assertEquals('Test 2', $editForm->get('activity_edit_form[name]')->getValue());
+ self::assertEquals('Test 2', $editForm->get('activity_edit_form[name]')->getValue());
}
public function testTeamPermissionAction(): void
@@ -317,13 +317,13 @@ class ActivityControllerTest extends ControllerBaseTest
{
$client = $this->getClientForAuthenticatedUser(User::ROLE_ADMIN);
$this->request($client, '/admin/activity/1/edit');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$this->request($client, '/admin/activity/1/delete');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$form = $client->getCrawler()->filter('form[name=form]')->form();
- $this->assertStringEndsWith($this->createUrl('/admin/activity/1/delete'), $form->getUri());
+ self::assertStringEndsWith($this->createUrl('/admin/activity/1/delete'), $form->getUri());
$client->submit($form);
$client->followRedirect();
@@ -331,7 +331,7 @@ class ActivityControllerTest extends ControllerBaseTest
$this->assertHasNoEntriesWithFilter($client);
$this->request($client, '/admin/activity/1/edit');
- $this->assertFalse($client->getResponse()->isSuccessful());
+ self::assertFalse($client->getResponse()->isSuccessful());
}
public function testDeleteActionWithTimesheetEntries(): void
@@ -347,18 +347,18 @@ class ActivityControllerTest extends ControllerBaseTest
$this->importFixture($fixture);
$timesheets = $em->getRepository(Timesheet::class)->findAll();
- $this->assertEquals(10, \count($timesheets));
+ self::assertEquals(10, \count($timesheets));
/** @var Timesheet $entry */
foreach ($timesheets as $entry) {
- $this->assertEquals(1, $entry->getActivity()->getId());
+ self::assertEquals(1, $entry->getActivity()->getId());
}
$this->request($client, '/admin/activity/1/delete');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$form = $client->getCrawler()->filter('form[name=form]')->form();
- $this->assertStringEndsWith($this->createUrl('/admin/activity/1/delete'), $form->getUri());
+ self::assertStringEndsWith($this->createUrl('/admin/activity/1/delete'), $form->getUri());
$client->submit($form);
$this->assertIsRedirect($client, $this->createUrl('/admin/activity/'));
@@ -368,10 +368,10 @@ class ActivityControllerTest extends ControllerBaseTest
$em->clear();
$timesheets = $em->getRepository(Timesheet::class)->findAll();
- $this->assertEquals(0, \count($timesheets));
+ self::assertEquals(0, \count($timesheets));
$this->request($client, '/admin/activity/1/edit');
- $this->assertFalse($client->getResponse()->isSuccessful());
+ self::assertFalse($client->getResponse()->isSuccessful());
}
public function testDeleteActionWithTimesheetEntriesAndReplacement(): void
@@ -392,18 +392,18 @@ class ActivityControllerTest extends ControllerBaseTest
$id = $activity->getId();
$timesheets = $em->getRepository(Timesheet::class)->findAll();
- $this->assertEquals(10, \count($timesheets));
+ self::assertEquals(10, \count($timesheets));
/** @var Timesheet $entry */
foreach ($timesheets as $entry) {
- $this->assertEquals(1, $entry->getActivity()->getId());
+ self::assertEquals(1, $entry->getActivity()->getId());
}
$this->request($client, '/admin/activity/1/delete');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$form = $client->getCrawler()->filter('form[name=form]')->form();
- $this->assertStringEndsWith($this->createUrl('/admin/activity/1/delete'), $form->getUri());
+ self::assertStringEndsWith($this->createUrl('/admin/activity/1/delete'), $form->getUri());
$client->submit($form, [
'form' => [
'activity' => $id
@@ -416,15 +416,15 @@ class ActivityControllerTest extends ControllerBaseTest
$this->assertHasFlashSuccess($client);
$timesheets = $em->getRepository(Timesheet::class)->findAll();
- $this->assertEquals(10, \count($timesheets));
+ self::assertEquals(10, \count($timesheets));
/** @var Timesheet $entry */
foreach ($timesheets as $entry) {
- $this->assertEquals($id, $entry->getActivity()->getId());
+ self::assertEquals($id, $entry->getActivity()->getId());
}
$this->request($client, '/admin/activity/1/edit');
- $this->assertFalse($client->getResponse()->isSuccessful());
+ self::assertFalse($client->getResponse()->isSuccessful());
}
/**
@@ -441,7 +441,7 @@ class ActivityControllerTest extends ControllerBaseTest
);
}
- public function getValidationTestData()
+ public static function getValidationTestData()
{
return [
[
diff --git a/tests/Controller/CalendarControllerTest.php b/tests/Controller/CalendarControllerTest.php
index d58b1fcc..47386af0 100644
--- a/tests/Controller/CalendarControllerTest.php
+++ b/tests/Controller/CalendarControllerTest.php
@@ -18,7 +18,7 @@ use App\Tests\Mocks\SystemConfigurationFactory;
/**
* @group integration
*/
-class CalendarControllerTest extends ControllerBaseTest
+class CalendarControllerTest extends AbstractControllerBaseTestCase
{
public function testIsSecure(): void
{
@@ -33,13 +33,13 @@ class CalendarControllerTest extends ControllerBaseTest
$this->importFixture($fixtures);
$this->request($client, '/calendar/');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$crawler = $client->getCrawler();
$calendar = $crawler->filter('div#timesheet_calendar');
- $this->assertEquals(1, $calendar->count());
+ self::assertEquals(1, $calendar->count());
$dragAndDropBoxes = $crawler->filter('div.card-body.drag-and-drop-source');
- $this->assertEquals(1, $dragAndDropBoxes->count());
+ self::assertEquals(1, $dragAndDropBoxes->count());
}
public function testCalendarActionAsSuperAdmin(): void
@@ -60,13 +60,13 @@ class CalendarControllerTest extends ControllerBaseTest
$crawler = $client->getCrawler();
$calendar = $crawler->filter('div#timesheet_calendar');
- $this->assertEquals(1, $calendar->count());
+ self::assertEquals(1, $calendar->count());
$content = $client->getResponse()->getContent();
- $this->assertStringContainsString("googleCalendarId: 'de.german#holiday@group.v.calendar.google.com',", $content);
- $this->assertStringContainsString("name: 'holidays'", $content);
- $this->assertStringContainsString("googleCalendarId: 'en.german#holiday@group.v.calendar.google.com',", $content);
- $this->assertStringContainsString("name: 'holidays_en'", $content);
+ self::assertStringContainsString("googleCalendarId: 'de.german#holiday@group.v.calendar.google.com',", $content);
+ self::assertStringContainsString("name: 'holidays'", $content);
+ self::assertStringContainsString("googleCalendarId: 'en.german#holiday@group.v.calendar.google.com',", $content);
+ self::assertStringContainsString("name: 'holidays_en'", $content);
}
protected function getDefaultSettings(): array
diff --git a/tests/Controller/ContractControllerTest.php b/tests/Controller/ContractControllerTest.php
index b395ed75..857edcb9 100644
--- a/tests/Controller/ContractControllerTest.php
+++ b/tests/Controller/ContractControllerTest.php
@@ -14,7 +14,7 @@ use App\Entity\User;
/**
* @group integration
*/
-class ContractControllerTest extends ControllerBaseTest
+class ContractControllerTest extends AbstractControllerBaseTestCase
{
public function testIsSecure(): void
{
diff --git a/tests/Controller/CustomerControllerTest.php b/tests/Controller/CustomerControllerTest.php
index 301c9314..07113d51 100644
--- a/tests/Controller/CustomerControllerTest.php
+++ b/tests/Controller/CustomerControllerTest.php
@@ -27,7 +27,7 @@ use Symfony\Component\HttpKernel\HttpKernelBrowser;
/**
* @group integration
*/
-class CustomerControllerTest extends ControllerBaseTest
+class CustomerControllerTest extends AbstractControllerBaseTestCase
{
public function testIsSecure(): void
{
@@ -91,7 +91,7 @@ class CustomerControllerTest extends ControllerBaseTest
'page' => 1,
]);
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$this->assertHasDataTable($client);
$this->assertDataTableRowCount($client, 'datatable_customer_admin', 5);
}
@@ -113,7 +113,7 @@ class CustomerControllerTest extends ControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_TEAMLEAD);
$this->request($client, '/admin/customer/');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$form = $client->getCrawler()->filter('form.searchform')->form();
$form->getFormNode()->setAttribute('action', $this->createUrl('/admin/customer/export'));
@@ -318,7 +318,7 @@ class CustomerControllerTest extends ControllerBaseTest
$form = $client->getCrawler()->filter('form[name=customer_edit_form]')->form();
$editForm = $client->getCrawler()->filter('form[name=customer_edit_form]')->form();
- $this->assertEquals(date_default_timezone_get(), $editForm->get('customer_edit_form[timezone]')->getValue());
+ self::assertEquals(date_default_timezone_get(), $editForm->get('customer_edit_form[timezone]')->getValue());
$client->submit($form, [
'customer_edit_form' => [
@@ -340,12 +340,12 @@ class CustomerControllerTest extends ControllerBaseTest
$dispatcher = self::getContainer()->get('event_dispatcher');
$dispatcher->addSubscriber(new CustomerTestMetaFieldSubscriberMock());
$this->assertAccessIsGranted($client, '/admin/customer/create');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$form = $client->getCrawler()->filter('form[name=customer_edit_form]')->form();
- $this->assertTrue($form->has('customer_edit_form[metaFields][metatestmock][value]'));
- $this->assertTrue($form->has('customer_edit_form[metaFields][foobar][value]'));
- $this->assertFalse($form->has('customer_edit_form[metaFields][0][value]'));
+ self::assertTrue($form->has('customer_edit_form[metaFields][metatestmock][value]'));
+ self::assertTrue($form->has('customer_edit_form[metaFields][foobar][value]'));
+ self::assertFalse($form->has('customer_edit_form[metaFields][0][value]'));
}
public function testEditAction(): void
@@ -353,7 +353,7 @@ class CustomerControllerTest extends ControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_ADMIN);
$this->assertAccessIsGranted($client, '/admin/customer/1/edit');
$form = $client->getCrawler()->filter('form[name=customer_edit_form]')->form();
- $this->assertEquals('Test', $form->get('customer_edit_form[name]')->getValue());
+ self::assertEquals('Test', $form->get('customer_edit_form[name]')->getValue());
$client->submit($form, [
'customer_edit_form' => [
'name' => 'Test Customer 2'
@@ -363,7 +363,7 @@ class CustomerControllerTest extends ControllerBaseTest
$client->followRedirect();
$this->request($client, '/admin/customer/1/edit');
$editForm = $client->getCrawler()->filter('form[name=customer_edit_form]')->form();
- $this->assertEquals('Test Customer 2', $editForm->get('customer_edit_form[name]')->getValue());
+ self::assertEquals('Test Customer 2', $editForm->get('customer_edit_form[name]')->getValue());
}
public function testTeamPermissionAction(): void
@@ -408,12 +408,12 @@ class CustomerControllerTest extends ControllerBaseTest
$id = $customer->getId();
$this->request($client, '/admin/customer/' . $id . '/edit');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$this->request($client, '/admin/customer/' . $id . '/delete');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$form = $client->getCrawler()->filter('form[name=form]')->form();
- $this->assertStringEndsWith($this->createUrl('/admin/customer/' . $id . '/delete'), $form->getUri());
+ self::assertStringEndsWith($this->createUrl('/admin/customer/' . $id . '/delete'), $form->getUri());
$client->submit($form);
$client->followRedirect();
@@ -421,7 +421,7 @@ class CustomerControllerTest extends ControllerBaseTest
$this->assertHasFlashSuccess($client);
$this->request($client, '/admin/customer/' . $id . '/edit');
- $this->assertFalse($client->getResponse()->isSuccessful());
+ self::assertFalse($client->getResponse()->isSuccessful());
}
public function testDeleteActionWithTimesheetEntries(): void
@@ -435,18 +435,18 @@ class CustomerControllerTest extends ControllerBaseTest
$this->importFixture($fixture);
$timesheets = $em->getRepository(Timesheet::class)->findAll();
- $this->assertEquals(10, \count($timesheets));
+ self::assertEquals(10, \count($timesheets));
/** @var Timesheet $entry */
foreach ($timesheets as $entry) {
- $this->assertEquals(1, $entry->getActivity()->getId());
+ self::assertEquals(1, $entry->getActivity()->getId());
}
$this->request($client, '/admin/customer/1/delete');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$form = $client->getCrawler()->filter('form[name=form]')->form();
- $this->assertStringEndsWith($this->createUrl('/admin/customer/1/delete'), $form->getUri());
+ self::assertStringEndsWith($this->createUrl('/admin/customer/1/delete'), $form->getUri());
$client->submit($form);
$this->assertIsRedirect($client, $this->createUrl('/admin/customer/'));
@@ -456,10 +456,10 @@ class CustomerControllerTest extends ControllerBaseTest
$em->clear();
$timesheets = $em->getRepository(Timesheet::class)->findAll();
- $this->assertEquals(0, \count($timesheets));
+ self::assertEquals(0, \count($timesheets));
$this->request($client, '/admin/customer/1/edit');
- $this->assertFalse($client->getResponse()->isSuccessful());
+ self::assertFalse($client->getResponse()->isSuccessful());
}
public function testDeleteActionWithTimesheetEntriesAndReplacement(): void
@@ -478,18 +478,18 @@ class CustomerControllerTest extends ControllerBaseTest
$id = $customer->getId();
$timesheets = $em->getRepository(Timesheet::class)->findAll();
- $this->assertEquals(10, \count($timesheets));
+ self::assertEquals(10, \count($timesheets));
/** @var Timesheet $entry */
foreach ($timesheets as $entry) {
- $this->assertEquals(1, $entry->getProject()->getCustomer()->getId());
+ self::assertEquals(1, $entry->getProject()->getCustomer()->getId());
}
$this->request($client, '/admin/customer/1/delete');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$form = $client->getCrawler()->filter('form[name=form]')->form();
- $this->assertStringEndsWith($this->createUrl('/admin/customer/1/delete'), $form->getUri());
+ self::assertStringEndsWith($this->createUrl('/admin/customer/1/delete'), $form->getUri());
$client->submit($form, [
'form' => [
'customer' => $id
@@ -502,15 +502,15 @@ class CustomerControllerTest extends ControllerBaseTest
$this->assertHasFlashSuccess($client);
$timesheets = $em->getRepository(Timesheet::class)->findAll();
- $this->assertEquals(10, \count($timesheets));
+ self::assertEquals(10, \count($timesheets));
/** @var Timesheet $entry */
foreach ($timesheets as $entry) {
- $this->assertEquals($id, $entry->getProject()->getCustomer()->getId());
+ self::assertEquals($id, $entry->getProject()->getCustomer()->getId());
}
$this->request($client, '/admin/customer/1/edit');
- $this->assertFalse($client->getResponse()->isSuccessful());
+ self::assertFalse($client->getResponse()->isSuccessful());
}
/**
@@ -527,7 +527,7 @@ class CustomerControllerTest extends ControllerBaseTest
);
}
- public function getValidationTestData()
+ public static function getValidationTestData()
{
return [
[
diff --git a/tests/Controller/DashboardControllerTest.php b/tests/Controller/DashboardControllerTest.php
index 320ceaa8..593f8182 100644
--- a/tests/Controller/DashboardControllerTest.php
+++ b/tests/Controller/DashboardControllerTest.php
@@ -12,7 +12,7 @@ namespace App\Tests\Controller;
/**
* @group integration
*/
-class DashboardControllerTest extends ControllerBaseTest
+class DashboardControllerTest extends AbstractControllerBaseTestCase
{
public function testIsSecure(): void
{
@@ -23,7 +23,7 @@ class DashboardControllerTest extends ControllerBaseTest
{
$client = $this->getClientForAuthenticatedUser();
$this->request($client, '/dashboard/');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$this->assertMainContentClass($client, 'dashboard');
self::assertEquals(1, $client->getCrawler()->filter('div#PaginatedWorkingTimeChartBox canvas')->count());
}
diff --git a/tests/Controller/DoctorControllerTest.php b/tests/Controller/DoctorControllerTest.php
index a42951c0..8f5e7d6b 100644
--- a/tests/Controller/DoctorControllerTest.php
+++ b/tests/Controller/DoctorControllerTest.php
@@ -14,7 +14,7 @@ use App\Entity\User;
/**
* @group integration
*/
-class DoctorControllerTest extends ControllerBaseTest
+class DoctorControllerTest extends AbstractControllerBaseTestCase
{
public function testDoctorIsSecure(): void
{
diff --git a/tests/Controller/ExportControllerTest.php b/tests/Controller/ExportControllerTest.php
index 8db26f88..663bfa96 100644
--- a/tests/Controller/ExportControllerTest.php
+++ b/tests/Controller/ExportControllerTest.php
@@ -18,7 +18,7 @@ use Doctrine\ORM\EntityManager;
/**
* @group integration
*/
-class ExportControllerTest extends ControllerBaseTest
+class ExportControllerTest extends AbstractControllerBaseTestCase
{
public function testIsSecure(): void
{
@@ -35,7 +35,7 @@ class ExportControllerTest extends ControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_TEAMLEAD);
$this->request($client, '/export/?performSearch=performSearch');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$this->assertHasNoEntriesWithFilter($client);
}
@@ -83,7 +83,7 @@ class ExportControllerTest extends ControllerBaseTest
$em->flush();
$this->request($client, '/export/?performSearch=performSearch');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
// make sure all existing records are displayed
$this->assertHasDataTable($client);
@@ -106,7 +106,7 @@ class ExportControllerTest extends ControllerBaseTest
$type = $button->getAttribute('data-type');
unset($expected[$type]);
}
- $this->assertEmpty($expected);
+ self::assertEmpty($expected);
}
public function testIndexActionWithEntriesForTeamleadDoesNotShowUserWithoutTeam(): void
@@ -126,7 +126,7 @@ class ExportControllerTest extends ControllerBaseTest
$this->importFixture($fixture);
$this->request($client, '/export/?performSearch=performSearch');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
// make sure existing records are not displayed
$this->assertHasNoEntriesWithFilter($client);
@@ -142,7 +142,7 @@ class ExportControllerTest extends ControllerBaseTest
$this->importFixture($fixture);
$this->request($client, '/export/?performSearch=performSearch');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
// make sure all existing records are displayed
$this->assertHasDataTable($client);
@@ -165,7 +165,7 @@ class ExportControllerTest extends ControllerBaseTest
$type = $button->getAttribute('data-type');
unset($expected[$type]);
}
- $this->assertEmpty($expected);
+ self::assertEmpty($expected);
}
public function testExportActionWithMissingRenderer(): void
@@ -180,7 +180,7 @@ class ExportControllerTest extends ControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_TEAMLEAD);
$this->request($client, '/export/', 'GET');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$form = $client->getCrawler()->filter('#export-form')->form();
$node = $form->getFormNode();
@@ -210,7 +210,7 @@ class ExportControllerTest extends ControllerBaseTest
$this->importFixture($fixture);
$this->request($client, '/export/');
- $this->assertTrue($client->getResponse()->isSuccessful());
+ self::assertTrue($client->getResponse()->isSuccessful());
$form = $client->getCrawler()->filter('#export-form')->form();
$node = $form->getFormNode();
@@ -224,26 +224,26 @@ class ExportControllerTest extends ControllerBaseTest
]);
$response = $client->getResponse();
- $this->assertTrue($response->isSuccessful());
+ self::assertTrue($response->isSuccessful());
$content = $response->getContent();
$node = $client->getCrawler()->filter('body');
- $this->assertEquals(1, $node->count());
+ self::assertEquals(1, $node->count());
// poor mans assertions ;-)
/** @var \DOMElement $element */
$element = $node->getIterator()[0];
- $this->assertStringContainsString('export_print', $element->getAttribute('class'));
- $this->assertStringContainsString('