From a39001d1745a2cca1da737cbe4f23ac5fc2d8da3 Mon Sep 17 00:00:00 2001 From: Brandon Shipley Date: Sat, 9 Aug 2025 15:12:04 -0700 Subject: [PATCH] test fixes - dont bother with auth in the plugin tests thats the app responsible --- .gitignore | 21 +- .idea/CakeAccounting.iml | 8 - .idea/modules.xml | 8 - composer.json | 12 +- composer.lock | 1280 ++++++++++++++++- .../DeAccountStatementsControllerTest.php | 57 +- .../DeAccountTemplatesControllerTest.php | 161 +-- .../Controller/DeAccountsControllerTest.php | 149 +- ...xternalAccountStatementsControllerTest.php | 57 +- .../DeExternalAccountsControllerTest.php | 154 +- .../DeJournalEntriesControllerTest.php | 90 +- .../DeJournalItemsControllerTest.php | 61 +- .../Controller/DeJournalsControllerTest.php | 149 +- tests/bootstrap.php | 148 +- tests/config/bootstrap.php | 1 + tests/config/routes.php | 1 + tests/test_app/src/Application.php | 38 + .../test_app/src/Controller/AppController.php | 16 + tests/test_app/src/View/AppView.php | 11 + tests/test_app/templates/Error/error500.php | 44 + tests/test_app/templates/layout/ajax.php | 6 + tests/test_app/templates/layout/default.php | 6 + 22 files changed, 1551 insertions(+), 927 deletions(-) delete mode 100644 .idea/CakeAccounting.iml delete mode 100644 .idea/modules.xml create mode 100644 tests/config/bootstrap.php create mode 100644 tests/config/routes.php create mode 100644 tests/test_app/src/Application.php create mode 100644 tests/test_app/src/Controller/AppController.php create mode 100644 tests/test_app/src/View/AppView.php create mode 100644 tests/test_app/templates/Error/error500.php create mode 100644 tests/test_app/templates/layout/ajax.php create mode 100644 tests/test_app/templates/layout/default.php diff --git a/.gitignore b/.gitignore index f2f952a..4f966bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,11 @@ -/composer.lock -/composer.phar -/phpunit.xml -/.phpunit.result.cache -/.phpunit.cache -/phpunit.phar -/config/Migrations/schema-dump-default.lock -/vendor/ -/.idea/ -config/app_local.php \ No newline at end of file +composer.lock +composer.phar +phpunit.xml +.phpunit.result.cache +.phpunit.cache +phpunit.phar +config/Migrations/schema-dump-default.lock +vendor/ +.idea/ +config/app_local.php +tmp \ No newline at end of file diff --git a/.idea/CakeAccounting.iml b/.idea/CakeAccounting.iml deleted file mode 100644 index c956989..0000000 --- a/.idea/CakeAccounting.iml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index a1511bd..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/composer.json b/composer.json index f79f33f..d942baf 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { "name": "hi-powered-dev/cake-accounting", - "description": "CakeAccounting plugin for CakePHP", + "description": "A CakePHP plugin for double entry accounting/bookkeeping", "type": "cakephp-plugin", - "license": "AGPL-3.0-or-later", + "license": "MIT", "keywords": [ "cakephp" ], @@ -15,11 +15,14 @@ ], "require": { "php": ">=8.1", + "dereuromark/cakephp-tools": "^3.9", + "hi-powered-dev/cheese-cake": "dev-prod", "cakephp/cakephp": "^5.0.1", "ext-bcmath" : "*" }, "require-dev": { - "phpunit/phpunit": "^10.1" + "phpunit/phpunit": "^10.1", + "cakephp/migrations": "^4.0.0" }, "autoload": { "psr-4": { @@ -29,7 +32,8 @@ "autoload-dev": { "psr-4": { "CakeAccounting\\Test\\": "tests/", - "Cake\\Test\\": "vendor/cakephp/cakephp/tests/" + "Cake\\Test\\": "vendor/cakephp/cakephp/tests/", + "TestApp\\": "tests/test_app/src/" } } } diff --git a/composer.lock b/composer.lock index cf345f3..b6afa6d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5ff8ff9e9e8e285405906c0121800ee0", + "content-hash": "cfc89096876835f9bbad35d58a4778e2", "packages": [ { "name": "cakephp/cakephp", - "version": "5.1.1", + "version": "5.2.6", "source": { "type": "git", "url": "https://github.com/cakephp/cakephp.git", - "reference": "b7ac799b88cd751cdbe8ce808767a0e8fbf474bb" + "reference": "89c925007e9bc149198d0f4cf923e3ad770fb086" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/cakephp/zipball/b7ac799b88cd751cdbe8ce808767a0e8fbf474bb", - "reference": "b7ac799b88cd751cdbe8ce808767a0e8fbf474bb", + "url": "https://api.github.com/repos/cakephp/cakephp/zipball/89c925007e9bc149198d0f4cf923e3ad770fb086", + "reference": "89c925007e9bc149198d0f4cf923e3ad770fb086", "shasum": "" }, "require": { @@ -65,23 +65,24 @@ "cakephp/validation": "self.version" }, "require-dev": { - "cakephp/cakephp-codesniffer": "^5.0", - "http-interop/http-factory-tests": "^2.0", + "cakephp/cakephp-codesniffer": "^5.2", + "http-interop/http-factory-tests": "dev-main", "mikey179/vfsstream": "^1.6.10", "mockery/mockery": "^1.6", "paragonie/csp-builder": "^2.3 || ^3.0", - "phpstan/extension-installer": "^1.3", - "phpstan/phpstan": "1.12.3", - "phpunit/phpunit": "^10.5.5 || ^11.1.3", - "symplify/phpstan-rules": "^12.4" + "phpunit/phpunit": "^10.5.5 || ^11.1.3 || ^12.0.9" }, "suggest": { "ext-curl": "To enable more efficient network calls in Http\\Client.", "ext-openssl": "To use Security::encrypt() or have secure CSRF token generation.", - "lib-ICU": "To use locale-aware features in the I18n and Database packages", "paragonie/csp-builder": "CSP builder, to use the CSP Middleware" }, "type": "library", + "extra": { + "branch-alias": { + "dev-5.next": "5.2.x-dev" + } + }, "autoload": { "files": [ "src/Core/functions.php", @@ -124,20 +125,20 @@ "issues": "https://github.com/cakephp/cakephp/issues", "source": "https://github.com/cakephp/cakephp" }, - "time": "2024-10-04T02:50:14+00:00" + "time": "2025-08-02T03:14:22+00:00" }, { "name": "cakephp/chronos", - "version": "3.1.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/cakephp/chronos.git", - "reference": "786d69e1ee4b735765cbdb5521b9603e9b98d650" + "reference": "6c820947bc1372a250288ab164ec1b3bb7afab39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/chronos/zipball/786d69e1ee4b735765cbdb5521b9603e9b98d650", - "reference": "786d69e1ee4b735765cbdb5521b9603e9b98d650", + "url": "https://api.github.com/repos/cakephp/chronos/zipball/6c820947bc1372a250288ab164ec1b3bb7afab39", + "reference": "6c820947bc1372a250288ab164ec1b3bb7afab39", "shasum": "" }, "require": { @@ -183,20 +184,20 @@ "issues": "https://github.com/cakephp/chronos/issues", "source": "https://github.com/cakephp/chronos" }, - "time": "2024-07-18T03:18:04+00:00" + "time": "2025-06-28T11:35:59+00:00" }, { "name": "composer/ca-bundle", - "version": "1.5.2", + "version": "1.5.7", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "48a792895a2b7a6ee65dd5442c299d7b835b6137" + "reference": "d665d22c417056996c59019579f1967dfe5c1e82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/48a792895a2b7a6ee65dd5442c299d7b835b6137", - "reference": "48a792895a2b7a6ee65dd5442c299d7b835b6137", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/d665d22c417056996c59019579f1967dfe5c1e82", + "reference": "d665d22c417056996c59019579f1967dfe5c1e82", "shasum": "" }, "require": { @@ -243,7 +244,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.5.2" + "source": "https://github.com/composer/ca-bundle/tree/1.5.7" }, "funding": [ { @@ -259,20 +260,179 @@ "type": "tidelift" } ], - "time": "2024-09-25T07:49:53+00:00" + "time": "2025-05-26T15:08:54+00:00" }, { - "name": "laminas/laminas-diactoros", - "version": "3.5.0", + "name": "dereuromark/cakephp-shim", + "version": "3.8.1", "source": { "type": "git", - "url": "https://github.com/laminas/laminas-diactoros.git", - "reference": "143a16306602ce56b8b092a7914fef03c37f9ed2" + "url": "https://github.com/dereuromark/cakephp-shim.git", + "reference": "ae5e1c4312fd681064925a73a00ded913d078f63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/143a16306602ce56b8b092a7914fef03c37f9ed2", - "reference": "143a16306602ce56b8b092a7914fef03c37f9ed2", + "url": "https://api.github.com/repos/dereuromark/cakephp-shim/zipball/ae5e1c4312fd681064925a73a00ded913d078f63", + "reference": "ae5e1c4312fd681064925a73a00ded913d078f63", + "shasum": "" + }, + "require": { + "cakephp/cakephp": "^5.1.1", + "php": ">=8.1" + }, + "require-dev": { + "dereuromark/cakephp-ide-helper": "^2.0.0", + "fig-r/psr2r-sniffer": "dev-master", + "phpunit/phpunit": "^10.5 || ^11.5 || ^12.1" + }, + "type": "cakephp-plugin", + "autoload": { + "psr-4": { + "Shim\\": "src/", + "Shim\\Test\\Fixture\\": "tests/Fixture/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Scherer", + "homepage": "https://www.dereuromark.de", + "role": "Maintainer" + } + ], + "description": "A CakePHP plugin to shim applications between major framework versions.", + "homepage": "https://github.com/dereuromark/cakephp-shim", + "keywords": [ + "cakephp", + "helpers", + "plugin", + "shim" + ], + "support": { + "issues": "https://github.com/dereuromark/cakephp-shim/issues", + "source": "https://github.com/dereuromark/cakephp-shim" + }, + "time": "2025-07-21T11:43:55+00:00" + }, + { + "name": "dereuromark/cakephp-tools", + "version": "3.11.0", + "source": { + "type": "git", + "url": "https://github.com/dereuromark/cakephp-tools.git", + "reference": "c82d5f16d6308a35774f59fc21702d34314e833e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dereuromark/cakephp-tools/zipball/c82d5f16d6308a35774f59fc21702d34314e833e", + "reference": "c82d5f16d6308a35774f59fc21702d34314e833e", + "shasum": "" + }, + "require": { + "cakephp/cakephp": "^5.1.1", + "dereuromark/cakephp-shim": "^3.0.0", + "php": ">=8.1" + }, + "require-dev": { + "cakephp/authentication": "^3.1.0", + "fig-r/psr2r-sniffer": "dev-master", + "mobiledetect/mobiledetectlib": "^4.8.09", + "phpunit/phpunit": "^10.5 || ^11.5 || ^12.1", + "yangqi/htmldom": "^1.0" + }, + "suggest": { + "yangqi/htmldom": "For HtmlDom usage" + }, + "type": "cakephp-plugin", + "autoload": { + "psr-4": { + "Tools\\": "src/", + "Tools\\Test\\Fixture\\": "tests/Fixture/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Scherer", + "homepage": "https://www.dereuromark.de", + "role": "Author" + } + ], + "description": "A CakePHP plugin containing lots of useful and reusable tools", + "homepage": "https://github.com/dereuromark/cakephp-tools", + "keywords": [ + "behaviors", + "cakephp", + "components", + "datasources", + "helpers", + "plugin", + "tools", + "utils" + ], + "support": { + "issues": "https://github.com/dereuromark/cakephp-tools/issues", + "source": "https://github.com/dereuromark/cakephp-tools" + }, + "time": "2025-07-14T09:41:41+00:00" + }, + { + "name": "hi-powered-dev/cheese-cake", + "version": "dev-prod", + "source": { + "type": "git", + "url": "https://code.hipowered.dev/HiPoweredDev/CheeseCake", + "reference": "d2b733bd0e83b1492c5b1a8f2b4ca8a3b05ccc2d" + }, + "require": { + "cakephp/cakephp": "^5.0.0", + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.1" + }, + "default-branch": true, + "type": "cakephp-plugin", + "autoload": { + "psr-4": { + "CheeseCake\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AGPL-3.0-or-later" + ], + "authors": [ + { + "name": "HiPoweredDev", + "homepage": "https://hipowered.dev", + "role": "Author" + } + ], + "description": "A CakePHP plugin with misc. goodies ", + "keywords": [ + "cakephp" + ], + "time": "2025-03-29T10:05:34+00:00" + }, + { + "name": "laminas/laminas-diactoros", + "version": "3.6.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-diactoros.git", + "reference": "b068eac123f21c0e592de41deeb7403b88e0a89f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/b068eac123f21c0e592de41deeb7403b88e0a89f", + "reference": "b068eac123f21c0e592de41deeb7403b88e0a89f", "shasum": "" }, "require": { @@ -293,7 +453,7 @@ "ext-gd": "*", "ext-libxml": "*", "http-interop/http-factory-tests": "^2.2.0", - "laminas/laminas-coding-standard": "~2.5.0", + "laminas/laminas-coding-standard": "~3.0.0", "php-http/psr7-integration-tests": "^1.4.0", "phpunit/phpunit": "^10.5.36", "psalm/plugin-phpunit": "^0.19.0", @@ -302,8 +462,8 @@ "type": "library", "extra": { "laminas": { - "config-provider": "Laminas\\Diactoros\\ConfigProvider", - "module": "Laminas\\Diactoros" + "module": "Laminas\\Diactoros", + "config-provider": "Laminas\\Diactoros\\ConfigProvider" } }, "autoload": { @@ -347,20 +507,20 @@ "type": "community_bridge" } ], - "time": "2024-10-14T11:59:49+00:00" + "time": "2025-05-05T16:03:34+00:00" }, { "name": "laminas/laminas-httphandlerrunner", - "version": "2.11.0", + "version": "2.12.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-httphandlerrunner.git", - "reference": "c428d9f67f280d155637cbe2b7245b5188c8cdae" + "reference": "b14da3519c650e9436e410cfedee6f860312eff9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-httphandlerrunner/zipball/c428d9f67f280d155637cbe2b7245b5188c8cdae", - "reference": "c428d9f67f280d155637cbe2b7245b5188c8cdae", + "url": "https://api.github.com/repos/laminas/laminas-httphandlerrunner/zipball/b14da3519c650e9436e410cfedee6f860312eff9", + "reference": "b14da3519c650e9436e410cfedee6f860312eff9", "shasum": "" }, "require": { @@ -370,11 +530,11 @@ "psr/http-server-handler": "^1.0" }, "require-dev": { - "laminas/laminas-coding-standard": "~3.0.0", - "laminas/laminas-diactoros": "^3.4.0", - "phpunit/phpunit": "^10.5.36", - "psalm/plugin-phpunit": "^0.19.0", - "vimeo/psalm": "^5.26.1" + "laminas/laminas-coding-standard": "~3.1.0", + "laminas/laminas-diactoros": "^3.6.0", + "phpunit/phpunit": "^10.5.46", + "psalm/plugin-phpunit": "^0.19.5", + "vimeo/psalm": "^6.10.3" }, "type": "library", "extra": { @@ -414,20 +574,20 @@ "type": "community_bridge" } ], - "time": "2024-10-17T20:37:17+00:00" + "time": "2025-05-13T21:21:16+00:00" }, { "name": "league/container", - "version": "4.2.3", + "version": "4.2.5", "source": { "type": "git", "url": "https://github.com/thephpleague/container.git", - "reference": "72f9bebe7bd623007782a40f5ec305661ab706d8" + "reference": "d3cebb0ff4685ff61c749e54b27db49319e2ec00" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/container/zipball/72f9bebe7bd623007782a40f5ec305661ab706d8", - "reference": "72f9bebe7bd623007782a40f5ec305661ab706d8", + "url": "https://api.github.com/repos/thephpleague/container/zipball/d3cebb0ff4685ff61c749e54b27db49319e2ec00", + "reference": "d3cebb0ff4685ff61c749e54b27db49319e2ec00", "shasum": "" }, "require": { @@ -452,11 +612,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev", - "dev-4.x": "4.x-dev", - "dev-3.x": "3.x-dev", + "dev-1.x": "1.x-dev", "dev-2.x": "2.x-dev", - "dev-1.x": "1.x-dev" + "dev-3.x": "3.x-dev", + "dev-4.x": "4.x-dev", + "dev-master": "4.x-dev" } }, "autoload": { @@ -488,7 +648,7 @@ ], "support": { "issues": "https://github.com/thephpleague/container/issues", - "source": "https://github.com/thephpleague/container/tree/4.2.3" + "source": "https://github.com/thephpleague/container/tree/4.2.5" }, "funding": [ { @@ -496,7 +656,7 @@ "type": "github" } ], - "time": "2024-10-23T12:06:58+00:00" + "time": "2025-05-20T12:55:37+00:00" }, { "name": "psr/clock", @@ -976,17 +1136,78 @@ ], "packages-dev": [ { - "name": "myclabs/deep-copy", - "version": "1.12.0", + "name": "cakephp/migrations", + "version": "4.7.0", "source": { "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" + "url": "https://github.com/cakephp/migrations.git", + "reference": "f6c05c9ec93e53bd6ac76fadbe02dcb80401b408" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "url": "https://api.github.com/repos/cakephp/migrations/zipball/f6c05c9ec93e53bd6ac76fadbe02dcb80401b408", + "reference": "f6c05c9ec93e53bd6ac76fadbe02dcb80401b408", + "shasum": "" + }, + "require": { + "cakephp/cache": "^5.2", + "cakephp/orm": "^5.2", + "php": ">=8.1", + "robmorgan/phinx": "^0.16.10" + }, + "require-dev": { + "cakephp/bake": "^3.3", + "cakephp/cakephp": "^5.2.5", + "cakephp/cakephp-codesniffer": "^5.0", + "phpunit/phpunit": "^10.5.5 || ^11.1.3 || ^12.2.4" + }, + "suggest": { + "cakephp/bake": "If you want to generate migrations.", + "dereuromark/cakephp-ide-helper": "If you want to have IDE suggest/autocomplete when creating migrations." + }, + "type": "cakephp-plugin", + "autoload": { + "psr-4": { + "Migrations\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "CakePHP Community", + "homepage": "https://github.com/cakephp/migrations/graphs/contributors" + } + ], + "description": "Database Migration plugin for CakePHP based on Phinx", + "homepage": "https://github.com/cakephp/migrations", + "keywords": [ + "cakephp", + "cli", + "migrations" + ], + "support": { + "forum": "https://stackoverflow.com/tags/cakephp", + "irc": "irc://irc.freenode.org/cakephp", + "issues": "https://github.com/cakephp/migrations/issues", + "source": "https://github.com/cakephp/migrations" + }, + "time": "2025-08-04T02:51:45+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.13.4", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a", "shasum": "" }, "require": { @@ -1025,7 +1246,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.4" }, "funding": [ { @@ -1033,20 +1254,20 @@ "type": "tidelift" } ], - "time": "2024-06-12T14:39:25+00:00" + "time": "2025-08-01T08:46:24+00:00" }, { "name": "nikic/php-parser", - "version": "v5.3.1", + "version": "v5.6.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b" + "reference": "221b0d0fdf1369c71047ad1d18bb5880017bbc56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b", - "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/221b0d0fdf1369c71047ad1d18bb5880017bbc56", + "reference": "221b0d0fdf1369c71047ad1d18bb5880017bbc56", "shasum": "" }, "require": { @@ -1089,9 +1310,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.0" }, - "time": "2024-10-08T18:51:32+00:00" + "time": "2025-07-27T20:03:57+00:00" }, { "name": "phar-io/manifest", @@ -1534,16 +1755,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.38", + "version": "10.5.49", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a86773b9e887a67bc53efa9da9ad6e3f2498c132" + "reference": "e2571b0e6e372de90f0b147b0cb9379bb105c124" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a86773b9e887a67bc53efa9da9ad6e3f2498c132", - "reference": "a86773b9e887a67bc53efa9da9ad6e3f2498c132", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e2571b0e6e372de90f0b147b0cb9379bb105c124", + "reference": "e2571b0e6e372de90f0b147b0cb9379bb105c124", "shasum": "" }, "require": { @@ -1553,7 +1774,7 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.12.0", + "myclabs/deep-copy": "^1.13.4", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", "php": ">=8.1", @@ -1615,7 +1836,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.38" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.49" }, "funding": [ { @@ -1626,12 +1847,107 @@ "url": "https://github.com/sebastianbergmann", "type": "github" }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, { "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", "type": "tidelift" } ], - "time": "2024-10-28T13:06:21+00:00" + "time": "2025-08-09T07:08:00+00:00" + }, + { + "name": "robmorgan/phinx", + "version": "0.16.10", + "source": { + "type": "git", + "url": "https://github.com/cakephp/phinx.git", + "reference": "83f83ec105e55e3abba7acc23c0272b5fcf66929" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cakephp/phinx/zipball/83f83ec105e55e3abba7acc23c0272b5fcf66929", + "reference": "83f83ec105e55e3abba7acc23c0272b5fcf66929", + "shasum": "" + }, + "require": { + "cakephp/database": "^5.0.2", + "composer-runtime-api": "^2.0", + "php-64bit": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/config": "^4.0|^5.0|^6.0|^7.0", + "symfony/console": "^6.0|^7.0" + }, + "require-dev": { + "cakephp/cakephp-codesniffer": "^5.0", + "cakephp/i18n": "^5.0", + "ext-json": "*", + "ext-pdo": "*", + "phpunit/phpunit": "^9.5.19", + "symfony/yaml": "^4.0|^5.0|^6.0|^7.0" + }, + "suggest": { + "ext-json": "Install if using JSON configuration format", + "ext-pdo": "PDO extension is needed", + "symfony/yaml": "Install if using YAML configuration format" + }, + "bin": [ + "bin/phinx" + ], + "type": "library", + "autoload": { + "psr-4": { + "Phinx\\": "src/Phinx/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Rob Morgan", + "email": "robbym@gmail.com", + "homepage": "https://robmorgan.id.au", + "role": "Lead Developer" + }, + { + "name": "Woody Gilk", + "email": "woody.gilk@gmail.com", + "homepage": "https://shadowhand.me", + "role": "Developer" + }, + { + "name": "Richard Quadling", + "email": "rquadling@gmail.com", + "role": "Developer" + }, + { + "name": "CakePHP Community", + "homepage": "https://github.com/cakephp/phinx/graphs/contributors", + "role": "Developer" + } + ], + "description": "Phinx makes it ridiculously easy to manage the database migrations for your PHP app.", + "homepage": "https://phinx.org", + "keywords": [ + "database", + "database migrations", + "db", + "migrations", + "phinx" + ], + "support": { + "issues": "https://github.com/cakephp/phinx/issues", + "source": "https://github.com/cakephp/phinx/tree/0.16.10" + }, + "time": "2025-07-08T18:55:28+00:00" }, { "name": "sebastian/cli-parser", @@ -2549,6 +2865,813 @@ ], "time": "2023-02-07T11:34:05+00:00" }, + { + "name": "symfony/config", + "version": "v7.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "faef36e271bbeb74a9d733be4b56419b157762e2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/faef36e271bbeb74a9d733be4b56419b157762e2", + "reference": "faef36e271bbeb74a9d733be4b56419b157762e2", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/filesystem": "^7.1", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/finder": "<6.4", + "symfony/service-contracts": "<2.5" + }, + "require-dev": { + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/finder": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/yaml": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/config/tree/v7.3.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-07-26T13:55:06+00:00" + }, + { + "name": "symfony/console", + "version": "v7.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "5f360ebc65c55265a74d23d7fe27f957870158a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/5f360ebc65c55265a74d23d7fe27f957870158a1", + "reference": "5f360ebc65c55265a74d23d7fe27f957870158a1", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^7.2" + }, + "conflict": { + "symfony/dependency-injection": "<6.4", + "symfony/dotenv": "<6.4", + "symfony/event-dispatcher": "<6.4", + "symfony/lock": "<6.4", + "symfony/process": "<6.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v7.3.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-07-30T17:13:41+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-25T14:21:43+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v7.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/edcbb768a186b5c3f25d0643159a787d3e63b7fd", + "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "require-dev": { + "symfony/process": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v7.3.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-07-07T08:17:47+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.32.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.32.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.32.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "3833d7255cc303546435cb650316bff708a1c75c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", + "reference": "3833d7255cc303546435cb650316bff708a1c75c", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.32.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "php": ">=7.2" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-12-23T08:48:59+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4", + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.6.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-04-25T09:37:31+00:00" + }, + { + "name": "symfony/string", + "version": "v7.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "42f505aff654e62ac7ac2ce21033818297ca89ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/42f505aff654e62ac7ac2ce21033818297ca89ca", + "reference": "42f505aff654e62ac7ac2ce21033818297ca89ca", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.5" + }, + "require-dev": { + "symfony/emoji": "^7.1", + "symfony/error-handler": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v7.3.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-07-10T08:47:49+00:00" + }, { "name": "theseer/tokenizer", "version": "1.2.3", @@ -2602,11 +3725,14 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": { + "hi-powered-dev/cheese-cake": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=8.1" + "php": ">=8.1", + "ext-bcmath": "*" }, "platform-dev": {}, "plugin-api-version": "2.6.0" diff --git a/tests/TestCase/Controller/DeAccountStatementsControllerTest.php b/tests/TestCase/Controller/DeAccountStatementsControllerTest.php index 17c420c..509571b 100644 --- a/tests/TestCase/Controller/DeAccountStatementsControllerTest.php +++ b/tests/TestCase/Controller/DeAccountStatementsControllerTest.php @@ -6,6 +6,7 @@ namespace CakeAccounting\Test\TestCase\Controller; use Cake\ORM\Table; use CakeAccounting\Controller\DeAccountStatementsController; use CakeAccounting\Model\Table\DeAccountStatementsTable; +use CakeAccounting\Model\Table\DeExternalAccountsTable; use PHPUnit\Exception; /** @@ -37,7 +38,11 @@ class DeAccountStatementsControllerTest extends BaseControllerTest protected function setUp(): void { parent::setUp(); - $this->DeAccountStatements = $this->getTableLocator()->get('DeAccountStatements'); +// $this->enableCsrfToken(); +// $this->enableSecurityToken(); + $this->disableErrorHandlerMiddleware(); + $config = $this->getTableLocator()->exists('DeAccountStatements') ? [] : ['className' => DeAccountStatementsTable::class]; + $this->DeAccountStatements = $this->getTableLocator()->get('DeAccountStatements', $config); } /** @@ -52,28 +57,6 @@ class DeAccountStatementsControllerTest extends BaseControllerTest parent::tearDown(); } - /** - * Test index method - * - * Tests the index action with an unauthenticated user (not logged in) - * - * @return void - * @throws Exception - * - * @uses DeAccountStatementsController::index - */ - public function testIndexGetUnauthenticated(): void - { - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeAccountStatements', - 'action' => 'index', - ]; - $this->get($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - } - /** * Test index method * @@ -86,7 +69,7 @@ class DeAccountStatementsControllerTest extends BaseControllerTest */ public function testIndexGetLoggedIn(): void { - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeAccountStatements', @@ -96,30 +79,6 @@ class DeAccountStatementsControllerTest extends BaseControllerTest $this->assertResponseCode(200); } - /** - * Test view method - * - * Tests the view action with an unauthenticated user (not logged in) - * - * @return void - * @throws Exception - * - * @uses DeAccountStatementsController::view - */ - public function testViewGetUnauthenticated(): void - { - $id = '4614401e-fe0c-45cf-9f17-c45c7848960e'; - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeAccountStatements', - 'action' => 'view', - $id, - ]; - $this->get($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - } - /** * Test view method * @@ -133,7 +92,7 @@ class DeAccountStatementsControllerTest extends BaseControllerTest public function testViewGetLoggedIn(): void { $id = '4614401e-fe0c-45cf-9f17-c45c7848960e'; - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeAccountStatements', diff --git a/tests/TestCase/Controller/DeAccountTemplatesControllerTest.php b/tests/TestCase/Controller/DeAccountTemplatesControllerTest.php index 92a0a1c..c8105be 100644 --- a/tests/TestCase/Controller/DeAccountTemplatesControllerTest.php +++ b/tests/TestCase/Controller/DeAccountTemplatesControllerTest.php @@ -49,11 +49,18 @@ class DeAccountTemplatesControllerTest extends BaseControllerTest protected function setUp(): void { parent::setUp(); - $this->DeAccountTemplates = $this->getTableLocator()->get('DeAccountTemplates'); - $this->DeAccounts = $this->getTableLocator()->get('DeAccounts'); - $this->DeTemplatedAccounts = $this->getTableLocator()->get('DeTemplatedAccounts'); - $this->enableCsrfToken(); - $this->enableSecurityToken(); +// $this->enableCsrfToken(); +// $this->enableSecurityToken(); + $this->disableErrorHandlerMiddleware(); + + $configDeAccountTemplates = $this->getTableLocator()->exists('DeAccountTemplates') ? [] : ['className' => DeAccountTemplatesTable::class]; + $this->DeAccountTemplates = $this->getTableLocator()->get('DeAccountTemplates', $configDeAccountTemplates); + + $configDeAccounts = $this->getTableLocator()->exists('DeAccounts') ? [] : ['className' => DeAccountsTable::class]; + $this->DeAccounts = $this->getTableLocator()->get('DeAccounts', $configDeAccounts); + + $configDeTemplatedAccounts = $this->getTableLocator()->exists('DeTemplatedAccounts') ? [] : ['className' => DeTemplatedAccountsTable::class]; + $this->DeTemplatedAccounts = $this->getTableLocator()->get('DeTemplatedAccounts', $configDeTemplatedAccounts); } /** @@ -68,28 +75,6 @@ class DeAccountTemplatesControllerTest extends BaseControllerTest parent::tearDown(); } - /** - * Test index method - * - * Tests the index action with an unauthenticated user (not logged in) - * - * @return void - * @throws Exception - * - * @uses DeAccountTemplatesController::index - */ - public function testIndexGetUnauthenticated(): void - { - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeAccountTemplates', - 'action' => 'index', - ]; - $this->get($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - } - /** * Test index method * @@ -102,7 +87,7 @@ class DeAccountTemplatesControllerTest extends BaseControllerTest */ public function testIndexGetLoggedIn(): void { - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeAccountTemplates', @@ -112,30 +97,6 @@ class DeAccountTemplatesControllerTest extends BaseControllerTest $this->assertResponseCode(200); } - /** - * Test view method - * - * Tests the view action with an unauthenticated user (not logged in) - * - * @return void - * @throws Exception - * - * @uses DeAccountTemplatesController::view - */ - public function testViewGetUnauthenticated(): void - { - $id = 1; - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeAccountTemplates', - 'action' => 'view', - $id, - ]; - $this->get($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - } - /** * Test view method * @@ -149,7 +110,7 @@ class DeAccountTemplatesControllerTest extends BaseControllerTest public function testViewGetLoggedIn(): void { $id = 1; - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeAccountTemplates', @@ -160,33 +121,6 @@ class DeAccountTemplatesControllerTest extends BaseControllerTest $this->assertResponseCode(200); } - /** - * Test select method - * - * Tests the select method which should import templated accounts as real accounts - * - * @throws Exception - * @return void - * - * @uses DeAccountTemplatesController::select - */ - public function testSelectPostUnauthenticated(): void - { - $cntBefore = $this->DeAccounts->find()->count(); - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeAccountTemplates', - 'action' => 'select', - 1, - ]; - $this->post($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - - $cntAfter = $this->DeAccounts->find()->count(); - $this->assertEquals($cntBefore, $cntAfter); - } - /** * Test select method * @@ -214,7 +148,7 @@ class DeAccountTemplatesControllerTest extends BaseControllerTest 'action' => 'select', 1, ]; - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $this->post($url); $this->assertResponseCode(302); $this->assertRedirectContains('de-accounts'); @@ -237,7 +171,7 @@ class DeAccountTemplatesControllerTest extends BaseControllerTest { $cntBefore = $this->DeAccountTemplates->find()->count(); - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeAccountTemplates', @@ -264,7 +198,7 @@ class DeAccountTemplatesControllerTest extends BaseControllerTest { $cntBefore = $this->DeAccountTemplates->find()->count(); - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeAccountTemplates', @@ -295,7 +229,7 @@ class DeAccountTemplatesControllerTest extends BaseControllerTest { $cntBefore = $this->DeAccountTemplates->find()->count(); - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeAccountTemplates', @@ -311,29 +245,6 @@ class DeAccountTemplatesControllerTest extends BaseControllerTest $this->assertEquals($cntBefore, $cntAfter); } - /** - * Test edit method - * - * Tests the edit action with an unauthenticated user (not logged in) - * - * @return void - * @throws Exception - * - * @uses DeAccountTemplatesController::edit - */ - public function testEditGetUnauthenticated(): void - { - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeAccountTemplates', - 'action' => 'edit', - 1, - ]; - $this->get($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - } - /** * Test edit method * @@ -346,7 +257,7 @@ class DeAccountTemplatesControllerTest extends BaseControllerTest */ public function testEditGetLoggedIn(): void { - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeAccountTemplates', @@ -369,7 +280,7 @@ class DeAccountTemplatesControllerTest extends BaseControllerTest */ public function testEditPutLoggedInSuccess(): void { - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $id = 1; $before = $this->DeAccountTemplates->get($id); $url = [ @@ -404,7 +315,7 @@ class DeAccountTemplatesControllerTest extends BaseControllerTest */ public function testEditPutLoggedInFailure(): void { - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $id = 1; $before = $this->DeAccountTemplates->get($id); $url = [ @@ -423,34 +334,6 @@ class DeAccountTemplatesControllerTest extends BaseControllerTest // assert save failed below } - /** - * Test delete method - * - * Tests the delete action with an unauthenticated user (not logged in) - * - * @return void - * @throws Exception - * - * @uses DeAccountTemplatesController::delete - */ - public function testDeleteUnauthenticated(): void - { - $cntBefore = $this->DeAccountTemplates->find()->count(); - - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeAccountTemplates', - 'action' => 'delete', - 1, - ]; - $this->delete($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - - $cntAfter = $this->DeAccountTemplates->find()->count(); - $this->assertEquals($cntBefore, $cntAfter); - } - /** * Test delete method * @@ -465,7 +348,7 @@ class DeAccountTemplatesControllerTest extends BaseControllerTest { $cntBefore = $this->DeAccountTemplates->find()->count(); - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeAccountTemplates', diff --git a/tests/TestCase/Controller/DeAccountsControllerTest.php b/tests/TestCase/Controller/DeAccountsControllerTest.php index d4572dd..aebdac0 100644 --- a/tests/TestCase/Controller/DeAccountsControllerTest.php +++ b/tests/TestCase/Controller/DeAccountsControllerTest.php @@ -38,9 +38,11 @@ class DeAccountsControllerTest extends BaseControllerTest protected function setUp(): void { parent::setUp(); - $this->DeAccounts = $this->getTableLocator()->get('DeAccounts'); - $this->enableCsrfToken(); - $this->enableSecurityToken(); +// $this->enableCsrfToken(); +// $this->enableSecurityToken(); + $this->disableErrorHandlerMiddleware(); + $config = $this->getTableLocator()->exists('DeAccounts') ? [] : ['className' => DeAccountsTable::class]; + $this->DeAccounts = $this->getTableLocator()->get('DeAccounts', $config); } /** @@ -55,28 +57,6 @@ class DeAccountsControllerTest extends BaseControllerTest parent::tearDown(); } - /** - * Test index method - * - * Tests the index action with an unauthenticated user (not logged in) - * - * @return void - * @throws Exception - * - * @uses DeAccountsController::index - */ - public function testIndexGetUnauthenticated(): void - { - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeAccounts', - 'action' => 'index', - ]; - $this->get($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - } - /** * Test index method * @@ -89,7 +69,7 @@ class DeAccountsControllerTest extends BaseControllerTest */ public function testIndexGetLoggedIn(): void { - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeAccounts', @@ -99,30 +79,6 @@ class DeAccountsControllerTest extends BaseControllerTest $this->assertResponseCode(200); } - /** - * Test view method - * - * Tests the view action with an unauthenticated user (not logged in) - * - * @return void - * @throws Exception - * - * @uses DeAccountsController::view - */ - public function testViewGetUnauthenticated(): void - { - $id = 41200; - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeAccounts', - 'action' => 'view', - $id, - ]; - $this->get($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - } - /** * Test view method * @@ -136,7 +92,7 @@ class DeAccountsControllerTest extends BaseControllerTest public function testViewGetLoggedIn(): void { $id = 41200; - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeAccounts', @@ -147,32 +103,6 @@ class DeAccountsControllerTest extends BaseControllerTest $this->assertResponseCode(200); } - /** - * Test add method - * - * Tests the add action with an unauthenticated user (not logged in) - * - * @return void - * @throws Exception - * - * @uses DeAccountsController::add - */ - public function testAddGetUnauthenticated(): void - { - $cntBefore = $this->DeAccounts->find()->count(); - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeAccounts', - 'action' => 'add', - ]; - $this->get($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - - $cntAfter = $this->DeAccounts->find()->count(); - $this->assertEquals($cntBefore, $cntAfter); - } - /** * Test add method * @@ -187,7 +117,7 @@ class DeAccountsControllerTest extends BaseControllerTest { $cntBefore = $this->DeAccounts->find()->count(); - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeAccounts', @@ -214,7 +144,7 @@ class DeAccountsControllerTest extends BaseControllerTest { $cntBefore = $this->DeAccounts->find()->count(); - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeAccounts', @@ -252,7 +182,7 @@ class DeAccountsControllerTest extends BaseControllerTest { $cntBefore = $this->DeAccounts->find()->count(); - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeAccounts', @@ -266,29 +196,6 @@ class DeAccountsControllerTest extends BaseControllerTest $this->assertEquals($cntBefore, $cntAfter); } - /** - * Test edit method - * - * Tests the edit action with an unauthenticated user (not logged in) - * - * @return void - * @throws Exception - * - * @uses DeAccountsController::edit - */ - public function testEditGetUnauthenticated(): void - { - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeAccounts', - 'action' => 'edit', - 41200, - ]; - $this->get($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - } - /** * Test edit method * @@ -301,7 +208,7 @@ class DeAccountsControllerTest extends BaseControllerTest */ public function testEditGetLoggedIn(): void { - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeAccounts', @@ -324,7 +231,7 @@ class DeAccountsControllerTest extends BaseControllerTest */ public function testEditPutLoggedInSuccess(): void { - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $id = 41200; $before = $this->DeAccounts->find()->where(['account_number' => $id])->firstOrFail(); $url = [ @@ -365,7 +272,7 @@ class DeAccountsControllerTest extends BaseControllerTest */ public function testEditPutLoggedInFailure(): void { - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $id = 41200; $before = $this->DeAccounts->find()->where(['account_number' => $id])->firstOrFail(); $url = [ @@ -388,34 +295,6 @@ class DeAccountsControllerTest extends BaseControllerTest // assert save failed below } - /** - * Test delete method - * - * Tests the delete action with an unauthenticated user (not logged in) - * - * @return void - * @throws Exception - * - * @uses DeAccountsController::delete - */ - public function testDeleteUnauthenticated(): void - { - $cntBefore = $this->DeAccounts->find()->count(); - - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeAccounts', - 'action' => 'delete', - 41200, - ]; - $this->delete($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - - $cntAfter = $this->DeAccounts->find()->count(); - $this->assertEquals($cntBefore, $cntAfter); - } - /** * Test delete method * @@ -430,7 +309,7 @@ class DeAccountsControllerTest extends BaseControllerTest { $cntBefore = $this->DeAccounts->find()->count(); - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeAccounts', diff --git a/tests/TestCase/Controller/DeExternalAccountStatementsControllerTest.php b/tests/TestCase/Controller/DeExternalAccountStatementsControllerTest.php index 6996ebf..4cae321 100644 --- a/tests/TestCase/Controller/DeExternalAccountStatementsControllerTest.php +++ b/tests/TestCase/Controller/DeExternalAccountStatementsControllerTest.php @@ -8,6 +8,7 @@ use Cake\TestSuite\IntegrationTestTrait; use Cake\TestSuite\TestCase; use CakeAccounting\Controller\DeExternalAccountStatementsController; use CakeAccounting\Model\Table\DeExternalAccountStatementsTable; +use CakeAccounting\Model\Table\DeJournalEntriesTable; use PHPUnit\Exception; /** @@ -38,7 +39,11 @@ class DeExternalAccountStatementsControllerTest extends BaseControllerTest protected function setUp(): void { parent::setUp(); - $this->DeExternalAccountStatements = $this->getTableLocator()->get('DeExternalAccountStatements'); +// $this->enableCsrfToken(); +// $this->enableSecurityToken(); + $this->disableErrorHandlerMiddleware(); + $config = $this->getTableLocator()->exists('DeExternalAccountStatements') ? [] : ['className' => DeExternalAccountStatementsTable::class]; + $this->DeExternalAccountStatements = $this->getTableLocator()->get('DeExternalAccountStatements', $config); } /** @@ -53,28 +58,6 @@ class DeExternalAccountStatementsControllerTest extends BaseControllerTest parent::tearDown(); } - /** - * Test index method - * - * Tests the index action with an unauthenticated user (not logged in) - * - * @return void - * @throws Exception - * - * @uses DeExternalAccountStatementsController::index - */ - public function testIndexGetUnauthenticated(): void - { - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeExternalAccountStatements', - 'action' => 'index', - ]; - $this->get($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - } - /** * Test index method * @@ -87,7 +70,7 @@ class DeExternalAccountStatementsControllerTest extends BaseControllerTest */ public function testIndexGetLoggedIn(): void { - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeExternalAccountStatements', @@ -97,30 +80,6 @@ class DeExternalAccountStatementsControllerTest extends BaseControllerTest $this->assertResponseCode(200); } - /** - * Test view method - * - * Tests the view action with an unauthenticated user (not logged in) - * - * @return void - * @throws Exception - * - * @uses DeExternalAccountStatementsController::view - */ - public function testViewGetUnauthenticated(): void - { - $id = '2f83162b-2bec-4826-8853-fbda2fac3a95'; - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeExternalAccountStatements', - 'action' => 'view', - $id, - ]; - $this->get($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - } - /** * Test view method * @@ -134,7 +93,7 @@ class DeExternalAccountStatementsControllerTest extends BaseControllerTest public function testViewGetLoggedIn(): void { $id = '2f83162b-2bec-4826-8853-fbda2fac3a95'; - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeExternalAccountStatements', diff --git a/tests/TestCase/Controller/DeExternalAccountsControllerTest.php b/tests/TestCase/Controller/DeExternalAccountsControllerTest.php index 2769d00..85148ca 100644 --- a/tests/TestCase/Controller/DeExternalAccountsControllerTest.php +++ b/tests/TestCase/Controller/DeExternalAccountsControllerTest.php @@ -4,8 +4,6 @@ declare(strict_types=1); namespace CakeAccounting\Test\TestCase\Controller; use Cake\ORM\Table; -use Cake\TestSuite\IntegrationTestTrait; -use Cake\TestSuite\TestCase; use CakeAccounting\Controller\DeExternalAccountsController; use CakeAccounting\Model\Table\DeExternalAccountsTable; use PHPUnit\Exception; @@ -39,9 +37,11 @@ class DeExternalAccountsControllerTest extends BaseControllerTest protected function setUp(): void { parent::setUp(); - $this->DeExternalAccounts = $this->getTableLocator()->get('DeExternalAccounts'); - $this->enableCsrfToken(); - $this->enableSecurityToken(); +// $this->enableCsrfToken(); +// $this->enableSecurityToken(); + $this->disableErrorHandlerMiddleware(); + $config = $this->getTableLocator()->exists('DeExternalAccounts') ? [] : ['className' => DeExternalAccountsTable::class]; + $this->DeExternalAccounts = $this->getTableLocator()->get('DeExternalAccounts', $config); } /** @@ -56,28 +56,6 @@ class DeExternalAccountsControllerTest extends BaseControllerTest parent::tearDown(); } - /** - * Test index method - * - * Tests the index action with an unauthenticated user (not logged in) - * - * @uses \CakeAccounting\Controller\DeExternalAccountsController::index() - * @throws Exception - * - * @return void - */ - public function testIndexGetUnauthenticated(): void - { - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeExternalAccounts', - 'action' => 'index', - ]; - $this->get($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - } - /** * Test index method * @@ -90,7 +68,7 @@ class DeExternalAccountsControllerTest extends BaseControllerTest */ public function testIndexGetLoggedIn(): void { - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeExternalAccounts', @@ -100,30 +78,6 @@ class DeExternalAccountsControllerTest extends BaseControllerTest $this->assertResponseCode(200); } - /** - * Test view method - * - * Tests the view action with an unauthenticated user (not logged in) - * - * @uses \CakeAccounting\Controller\DeExternalAccountsController::view() - * @throws Exception - * - * @return void - */ - public function testViewGetUnauthenticated(): void - { - $id = '2463dc4f-6f38-4492-8c8e-918f11e13748'; - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeExternalAccounts', - 'action' => 'view', - $id, - ]; - $this->get($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - } - /** * Test view method * @@ -137,7 +91,7 @@ class DeExternalAccountsControllerTest extends BaseControllerTest public function testViewGetLoggedIn(): void { $id = '2463dc4f-6f38-4492-8c8e-918f11e13748'; - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeExternalAccounts', @@ -148,32 +102,6 @@ class DeExternalAccountsControllerTest extends BaseControllerTest $this->assertResponseCode(200); } - /** - * Test add method - * - * Tests the add action with an unauthenticated user (not logged in) - * - * @uses \CakeAccounting\Controller\DeExternalAccountsController::add() - * @throws Exception - * - * @return void - */ - public function testAddGetUnauthenticated(): void - { - $cntBefore = $this->DeExternalAccounts->find()->count(); - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeExternalAccounts', - 'action' => 'add', - ]; - $this->get($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - - $cntAfter = $this->DeExternalAccounts->find()->count(); - $this->assertEquals($cntBefore, $cntAfter); - } - /** * Test add method * @@ -188,7 +116,7 @@ class DeExternalAccountsControllerTest extends BaseControllerTest { $cntBefore = $this->DeExternalAccounts->find()->count(); - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeExternalAccounts', @@ -215,7 +143,7 @@ class DeExternalAccountsControllerTest extends BaseControllerTest { $cntBefore = $this->DeExternalAccounts->find()->count(); - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeExternalAccounts', @@ -248,7 +176,7 @@ class DeExternalAccountsControllerTest extends BaseControllerTest { $cntBefore = $this->DeExternalAccounts->find()->count(); - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeExternalAccounts', @@ -262,31 +190,6 @@ class DeExternalAccountsControllerTest extends BaseControllerTest $this->assertEquals($cntBefore, $cntAfter); } - /** - * Test edit method - * - * Tests the edit action with an unauthenticated user (not logged in) - * - * @uses \CakeAccounting\Controller\DeExternalAccountsController::edit() - * @throws Exception - * - * @return void - */ - public function testEditGetUnauthenticated(): void - { - $id = '2463dc4f-6f38-4492-8c8e-918f11e13748'; - - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeExternalAccounts', - 'action' => 'edit', - $id, - ]; - $this->get($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - } - /** * Test edit method * @@ -301,7 +204,7 @@ class DeExternalAccountsControllerTest extends BaseControllerTest { $id = '2463dc4f-6f38-4492-8c8e-918f11e13748'; - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeExternalAccounts', @@ -324,7 +227,7 @@ class DeExternalAccountsControllerTest extends BaseControllerTest */ public function testEditPutLoggedInSuccess(): void { - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $id = '2463dc4f-6f38-4492-8c8e-918f11e13748'; $before = $this->DeExternalAccounts->get($id); $url = [ @@ -359,7 +262,7 @@ class DeExternalAccountsControllerTest extends BaseControllerTest */ public function testEditPutLoggedInFailure(): void { - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $id = '2463dc4f-6f38-4492-8c8e-918f11e13748'; $before = $this->DeExternalAccounts->get($id); $url = [ @@ -378,35 +281,6 @@ class DeExternalAccountsControllerTest extends BaseControllerTest // assert save failed below } - /** - * Test delete method - * - * Tests the delete action with an unauthenticated user (not logged in) - * - * @uses \CakeAccounting\Controller\DeExternalAccountsController::delete() - * @throws Exception - * - * @return void - */ - public function testDeleteUnauthenticated(): void - { - $cntBefore = $this->DeExternalAccounts->find()->count(); - $id = '2463dc4f-6f38-4492-8c8e-918f11e13748'; - - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeExternalAccounts', - 'action' => 'delete', - $id, - ]; - $this->delete($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - - $cntAfter = $this->DeExternalAccounts->find()->count(); - $this->assertEquals($cntBefore, $cntAfter); - } - /** * Test delete method * @@ -422,7 +296,7 @@ class DeExternalAccountsControllerTest extends BaseControllerTest $cntBefore = $this->DeExternalAccounts->find()->count(); $id = '2463dc4f-6f38-4492-8c8e-918f11e13748'; - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeExternalAccounts', diff --git a/tests/TestCase/Controller/DeJournalEntriesControllerTest.php b/tests/TestCase/Controller/DeJournalEntriesControllerTest.php index 24b1170..1222835 100644 --- a/tests/TestCase/Controller/DeJournalEntriesControllerTest.php +++ b/tests/TestCase/Controller/DeJournalEntriesControllerTest.php @@ -40,9 +40,11 @@ class DeJournalEntriesControllerTest extends BaseControllerTest protected function setUp(): void { parent::setUp(); - $this->DeJournalEntries = $this->getTableLocator()->get('DeJournalEntries'); - $this->enableCsrfToken(); - $this->enableSecurityToken(); +// $this->enableCsrfToken(); +// $this->enableSecurityToken(); + $this->disableErrorHandlerMiddleware(); + $config = $this->getTableLocator()->exists('DeJournalEntries') ? [] : ['className' => DeJournalEntriesTable::class]; + $this->DeJournalEntries = $this->getTableLocator()->get('DeJournalEntries', $config); } /** @@ -57,28 +59,6 @@ class DeJournalEntriesControllerTest extends BaseControllerTest parent::tearDown(); } - /** - * Test index method - * - * Tests the index action with an unauthenticated user (not logged in) - * - * @return void - * @throws Exception - * - * @uses DeJournalEntriesController::index - */ - public function testIndexGetUnauthenticated(): void - { - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeJournalEntries', - 'action' => 'index', - ]; - $this->get($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - } - /** * Test index method * @@ -91,7 +71,7 @@ class DeJournalEntriesControllerTest extends BaseControllerTest */ public function testIndexGetLoggedIn(): void { - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeJournalEntries', @@ -101,30 +81,6 @@ class DeJournalEntriesControllerTest extends BaseControllerTest $this->assertResponseCode(200); } - /** - * Test view method - * - * Tests the view action with an unauthenticated user (not logged in) - * - * @return void - * @throws Exception - * - * @uses DeJournalEntriesController::view - */ - public function testViewGetUnauthenticated(): void - { - $id = 1; - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeJournalEntries', - 'action' => 'view', - $id, - ]; - $this->get($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - } - /** * Test view method * @@ -138,7 +94,7 @@ class DeJournalEntriesControllerTest extends BaseControllerTest public function testViewGetLoggedIn(): void { $id = 1; - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeJournalEntries', @@ -149,32 +105,6 @@ class DeJournalEntriesControllerTest extends BaseControllerTest $this->assertResponseCode(200); } - /** - * Test add method - * - * Tests the add action with an unauthenticated user (not logged in) - * - * @return void - * @throws Exception - * - * @uses DeJournalEntriesController::add - */ - public function testAddGetUnauthenticated(): void - { - $cntBefore = $this->DeJournalEntries->find()->count(); - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeJournalEntries', - 'action' => 'add', - ]; - $this->get($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - - $cntAfter = $this->DeJournalEntries->find()->count(); - $this->assertEquals($cntBefore, $cntAfter); - } - /** * Test add method * @@ -189,7 +119,7 @@ class DeJournalEntriesControllerTest extends BaseControllerTest { $cntBefore = $this->DeJournalEntries->find()->count(); - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeJournalEntries', @@ -216,7 +146,7 @@ class DeJournalEntriesControllerTest extends BaseControllerTest { $cntBefore = $this->DeJournalEntries->find()->count(); - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeJournalEntries', @@ -257,7 +187,7 @@ class DeJournalEntriesControllerTest extends BaseControllerTest { $cntBefore = $this->DeJournalEntries->find()->count(); - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeJournalEntries', diff --git a/tests/TestCase/Controller/DeJournalItemsControllerTest.php b/tests/TestCase/Controller/DeJournalItemsControllerTest.php index 05055fa..c76d536 100644 --- a/tests/TestCase/Controller/DeJournalItemsControllerTest.php +++ b/tests/TestCase/Controller/DeJournalItemsControllerTest.php @@ -7,6 +7,7 @@ use Cake\ORM\Table; use CakeAccounting\Controller\DeJournalItemsController; use CakeAccounting\Model\Table\DeAccountsTable; use CakeAccounting\Model\Table\DeJournalItemsTable; +use CakeAccounting\Model\Table\DeJournalsTable; use PHPUnit\Exception; /** @@ -45,8 +46,14 @@ class DeJournalItemsControllerTest extends BaseControllerTest protected function setUp(): void { parent::setUp(); - $this->DeJournalItems = $this->getTableLocator()->get('DeJournalItems'); - $this->DeAccounts = $this->getTableLocator()->get('DeAccounts'); +// $this->enableCsrfToken(); +// $this->enableSecurityToken(); + $this->disableErrorHandlerMiddleware(); + $config = $this->getTableLocator()->exists('DeAccounts') ? [] : ['className' => DeAccountsTable::class]; + $this->DeAccounts = $this->getTableLocator()->get('DeAccounts', $config); + + $config = $this->getTableLocator()->exists('DeJournalItems') ? [] : ['className' => DeJournalItemsTable::class]; + $this->DeJournalItems = $this->getTableLocator()->get('DeJournalItems', $config); } /** @@ -61,28 +68,6 @@ class DeJournalItemsControllerTest extends BaseControllerTest parent::tearDown(); } - /** - * Test index method - * - * Tests the index action with an unauthenticated user (not logged in) - * - * @return void - * @throws Exception - * - * @uses DeJournalItemsController::index - */ - public function testIndexGetUnauthenticated(): void - { - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeJournalItems', - 'action' => 'index', - ]; - $this->get($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - } - /** * Test index method * @@ -95,7 +80,7 @@ class DeJournalItemsControllerTest extends BaseControllerTest */ public function testIndexGetLoggedIn(): void { - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeJournalItems', @@ -105,30 +90,6 @@ class DeJournalItemsControllerTest extends BaseControllerTest $this->assertResponseCode(200); } - /** - * Test view method - * - * Tests the view action with an unauthenticated user (not logged in) - * - * @return void - * @throws Exception - * - * @uses DeJournalItemsController::view - */ - public function testViewGetUnauthenticated(): void - { - $id = 1; - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeJournalItems', - 'action' => 'view', - $id, - ]; - $this->get($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - } - /** * Test view method * @@ -142,7 +103,7 @@ class DeJournalItemsControllerTest extends BaseControllerTest public function testViewGetLoggedIn(): void { $id = 1; - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeJournalItems', diff --git a/tests/TestCase/Controller/DeJournalsControllerTest.php b/tests/TestCase/Controller/DeJournalsControllerTest.php index 68acfcd..d55c622 100644 --- a/tests/TestCase/Controller/DeJournalsControllerTest.php +++ b/tests/TestCase/Controller/DeJournalsControllerTest.php @@ -42,9 +42,11 @@ class DeJournalsControllerTest extends BaseControllerTest protected function setUp(): void { parent::setUp(); - $this->DeJournals = $this->getTableLocator()->get('DeJournals'); - $this->enableCsrfToken(); - $this->enableSecurityToken(); +// $this->enableCsrfToken(); +// $this->enableSecurityToken(); + $this->disableErrorHandlerMiddleware(); + $config = $this->getTableLocator()->exists('DeJournals') ? [] : ['className' => DeJournalsTable::class]; + $this->DeJournals = $this->getTableLocator()->get('DeJournals', $config); } /** @@ -59,28 +61,6 @@ class DeJournalsControllerTest extends BaseControllerTest parent::tearDown(); } - /** - * Test index method - * - * Tests the index action with an unauthenticated user (not logged in) - * - * @return void - * @throws Exception - * - * @uses DeJournalsController::index - */ - public function testIndexGetUnauthenticated(): void - { - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeJournals', - 'action' => 'index', - ]; - $this->get($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - } - /** * Test index method * @@ -93,7 +73,7 @@ class DeJournalsControllerTest extends BaseControllerTest */ public function testIndexGetLoggedIn(): void { - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeJournals', @@ -103,30 +83,6 @@ class DeJournalsControllerTest extends BaseControllerTest $this->assertResponseCode(200); } - /** - * Test view method - * - * Tests the view action with an unauthenticated user (not logged in) - * - * @return void - * @throws Exception - * - * @uses DeJournalsController::view - */ - public function testViewGetUnauthenticated(): void - { - $id = 1; - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeJournals', - 'action' => 'view', - $id, - ]; - $this->get($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - } - /** * Test view method * @@ -140,7 +96,7 @@ class DeJournalsControllerTest extends BaseControllerTest public function testViewGetLoggedIn(): void { $id = 1; - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeJournals', @@ -151,32 +107,6 @@ class DeJournalsControllerTest extends BaseControllerTest $this->assertResponseCode(200); } - /** - * Test add method - * - * Tests the add action with an unauthenticated user (not logged in) - * - * @return void - * @throws Exception - * - * @uses DeJournalsController::add - */ - public function testAddGetUnauthenticated(): void - { - $cntBefore = $this->DeJournals->find()->count(); - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeJournals', - 'action' => 'add', - ]; - $this->get($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - - $cntAfter = $this->DeJournals->find()->count(); - $this->assertEquals($cntBefore, $cntAfter); - } - /** * Test add method * @@ -191,7 +121,7 @@ class DeJournalsControllerTest extends BaseControllerTest { $cntBefore = $this->DeJournals->find()->count(); - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeJournals', @@ -218,7 +148,7 @@ class DeJournalsControllerTest extends BaseControllerTest { $cntBefore = $this->DeJournals->find()->count(); - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeJournals', @@ -253,7 +183,7 @@ class DeJournalsControllerTest extends BaseControllerTest { $cntBefore = $this->DeJournals->find()->count(); - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeJournals', @@ -273,29 +203,6 @@ class DeJournalsControllerTest extends BaseControllerTest $this->assertEquals($cntBefore, $cntAfter); } - /** - * Test edit method - * - * Tests the edit action with an unauthenticated user (not logged in) - * - * @return void - * @throws Exception - * - * @uses DeJournalsController::edit - */ - public function testEditGetUnauthenticated(): void - { - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeJournals', - 'action' => 'edit', - 1, - ]; - $this->get($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - } - /** * Test edit method * @@ -308,7 +215,7 @@ class DeJournalsControllerTest extends BaseControllerTest */ public function testEditGetLoggedIn(): void { - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeJournals', @@ -331,7 +238,7 @@ class DeJournalsControllerTest extends BaseControllerTest */ public function testEditPutLoggedInSuccess(): void { - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $id = 1; $before = $this->DeJournals->get($id); $url = [ @@ -364,7 +271,7 @@ class DeJournalsControllerTest extends BaseControllerTest */ public function testEditPutLoggedInFailure(): void { - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $id = 1; $before = $this->DeJournals->get($id); $url = [ @@ -393,34 +300,6 @@ class DeJournalsControllerTest extends BaseControllerTest $this->assertEquals($before->de_journal_type_code, $after->de_journal_type_code); } - /** - * Test delete method - * - * Tests the delete action with an unauthenticated user (not logged in) - * - * @return void - * @throws Exception - * - * @uses DeJournalsController::delete - */ - public function testDeleteUnauthenticated(): void - { - $cntBefore = $this->DeJournals->find()->count(); - - $url = [ - 'plugin' => 'CakeAccounting', - 'controller' => 'DeJournals', - 'action' => 'delete', - 1, - ]; - $this->delete($url); - $this->assertResponseCode(302); - $this->assertRedirectContains('login'); - - $cntAfter = $this->DeJournals->find()->count(); - $this->assertEquals($cntBefore, $cntAfter); - } - /** * Test delete method * @@ -435,7 +314,7 @@ class DeJournalsControllerTest extends BaseControllerTest { $cntBefore = $this->DeJournals->find()->count(); - $this->loginUserByRole('admin'); + //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeJournals', diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 7165d4b..39b7741 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,43 +1,108 @@ 'TestApp', + 'encoding' => 'UTF-8', + 'paths' => [ + 'templates' => [ + PLUGIN_ROOT . DS . 'tests' . DS . 'test_app' . DS . 'templates' . DS, + ], + ], +]); + +Configure::write('debug', true); + +$cache = [ + 'default' => [ + 'engine' => 'File', + 'path' => CACHE, + ], + '_cake_core_' => [ + 'className' => 'File', + 'prefix' => 'crud_myapp_cake_core_', + 'path' => CACHE . 'persistent/', + 'serialize' => true, + 'duration' => '+10 seconds', + ], + '_cake_translations_' => [ + 'className' => 'File', + 'prefix' => 'crud_myapp_cake_core_', + 'path' => CACHE . 'persistent/', + 'serialize' => true, + 'duration' => '+10 seconds', + ], + '_cake_model_' => [ + 'className' => 'File', + 'prefix' => 'crud_my_app_cake_model_', + 'path' => CACHE . 'models/', + 'serialize' => 'File', + 'duration' => '+10 seconds', + ], +]; + +Cache::setConfig($cache); + +class_alias(AppController::class, 'App\Controller\AppController'); + +Plugin::getCollection()->add(new CakeAccountingPlugin()); + +Chronos::setTestNow(Chronos::now()); + +if (!getenv('DB_URL')) { + putenv('DB_URL=sqlite:///:memory:'); +} + +ConnectionManager::setConfig('test', [ + 'className' => Connection::class, + 'url' => getenv('DB_URL') ?: null, + 'timezone' => 'UTC', + 'quoteIdentifiers' => false, + 'cacheMetadata' => true, +]); /** * Load schema from a SQL dump file. @@ -49,12 +114,9 @@ if (file_exists($root . '/config/bootstrap.php')) { * using migrations to provide schema for your plugin, * and using \Migrations\TestSuite\Migrator to load schema. */ -$migrator = new Migrator(); +// Load a schema dump file. +//(new SchemaLoader())->loadSqlFiles('tests/schema.sql', 'test'); -// Run migrations for more than one plugin -$migrator->runMany([ - // Run app migrations on test connection. - ['connection' => 'test'], - // Run plugin migrations on test connection. - ['plugin' => 'CakeAccounting'], -]); + +$migrator = new Migrator(); +$migrator->run(['plugin' => 'CakeAccounting']); \ No newline at end of file diff --git a/tests/config/bootstrap.php b/tests/config/bootstrap.php new file mode 100644 index 0000000..b3d9bbc --- /dev/null +++ b/tests/config/bootstrap.php @@ -0,0 +1 @@ +addPlugin('CakeAccounting'); + } + + /** + * @inheritDoc + */ + public function middleware(MiddlewareQueue $middleware): MiddlewareQueue { + $middleware->add(new RoutingMiddleware($this)); + + return $middleware; + } + + public function routes(RouteBuilder $routes): void + { + parent::routes($routes); // TODO: Change the autogenerated stub + $routes->setRouteClass(DashedRoute::class); + + $routes->plugin('CakeAccounting', ['path' => '/cake-accounting'], function (RouteBuilder $pluginRoutes):void { + $pluginRoutes->fallbacks(); + }); + } +} diff --git a/tests/test_app/src/Controller/AppController.php b/tests/test_app/src/Controller/AppController.php new file mode 100644 index 0000000..7387589 --- /dev/null +++ b/tests/test_app/src/Controller/AppController.php @@ -0,0 +1,16 @@ +loadComponent('Flash'); + } +} diff --git a/tests/test_app/src/View/AppView.php b/tests/test_app/src/View/AppView.php new file mode 100644 index 0000000..e885cc1 --- /dev/null +++ b/tests/test_app/src/View/AppView.php @@ -0,0 +1,11 @@ +layout = 'error'; + +if (Configure::read('debug')): + $this->layout = 'dev_error'; + + $this->assign('title', $message); + $this->assign('templateName', 'error500.ctp'); + + $this->start('file'); +?> +queryString)) : ?> +

+ SQL Query: + queryString) ?> +

+ +params)) : ?> + SQL Query Params: + params) ?> + + + Error in: + getFile()), $error->getLine()) ?> + +element('auto_table_warning'); + + if (extension_loaded('xdebug')): + xdebug_print_function_stack(); + endif; + + $this->end(); +endif; +?> +

+

+ : + +

diff --git a/tests/test_app/templates/layout/ajax.php b/tests/test_app/templates/layout/ajax.php new file mode 100644 index 0000000..13b3dea --- /dev/null +++ b/tests/test_app/templates/layout/ajax.php @@ -0,0 +1,6 @@ + +fetch('content') ?> diff --git a/tests/test_app/templates/layout/default.php b/tests/test_app/templates/layout/default.php new file mode 100644 index 0000000..13b3dea --- /dev/null +++ b/tests/test_app/templates/layout/default.php @@ -0,0 +1,6 @@ + +fetch('content') ?>