From 78ea3c98c5502817081653c599006ce2a15419d2 Mon Sep 17 00:00:00 2001 From: gregcorbett Date: Fri, 15 Sep 2023 13:22:38 +0000 Subject: [PATCH] Bump PHPUnit to version 8 - the earliest version that is currently supported and works with PHP7.4 - PHPUnit 8 no longer works with the upstream dbunit, which has been abandoned - removed outdated config from tests/phpunit.xml in favour of default behaviour - Replace phpunit/dbunit with a supported fork, misantron/dbunit - Updated clases used, method signitures and documentation as needed due to that --- .github/actions/mysql_bootstrap_pdo.php | 4 +- .github/actions/sqlite_bootstrap_pdo.php | 4 +- composer.json | 4 +- composer.lock | 1370 ++++++++++------- tests/DoctrineTestSuite1.php | 4 +- tests/README.md | 16 +- tests/doctrine/DoctrineCleanInsert1Test.php | 26 +- .../doctrine/DowntimeServiceEndpointTest1.php | 26 +- .../ExtensionProps_IPIQuery_Test1.php | 24 +- tests/doctrine/ExtensionsTest.php | 24 +- tests/doctrine/NGIServiceTest.php | 26 +- tests/doctrine/RoleActionRecordTests.php | 22 +- tests/doctrine/RoleCascadeDeletionsTest.php | 26 +- tests/doctrine/RoleServiceTest.php | 26 +- tests/doctrine/RolesTest.php | 26 +- tests/doctrine/Scoped_IPIQuery_Test1.php | 26 +- tests/doctrine/ServiceDAOTest.php | 26 +- tests/doctrine/ServiceMoveTest.php | 26 +- tests/doctrine/ServiceTypeTest.php | 26 +- tests/doctrine/SiteMoveTest.php | 26 +- ...Site_CertStatusLogCascadeDeletionsTest.php | 26 +- tests/doctrine/bootstrap_pdo_TEMPLATE.php | 8 +- tests/exampleTests/DoctrineTestExample.php | 22 +- tests/exampleTests/DoctrineTestTemplate.php | 22 +- tests/exampleTests/FirstTest.php | 16 +- tests/miscTests/DateTimeConvertTests.php | 14 +- tests/miscTests/IPv6FormatTests.php | 14 +- .../PI_Extensions_Param_ParsingTest.php | 14 +- tests/phpunit.xml | 3 - .../ManageUnrenewedAPICredentialsTest.php | 26 +- .../ManageUnusedAPICredentialsTest.php | 26 +- .../APIAuthenticationServiceTest.php | 28 +- .../RoleActionAuthorisationServiceTest.php | 26 +- .../RoleActionMappingServiceTest.php | 39 +- .../lib/Gocdb_Services/RoleServiceTest2.php | 22 +- .../lib/Gocdb_Services/ScopeServiceTest.php | 26 +- .../lib/Gocdb_Services/ServiceServiceTest.php | 28 +- .../Gocdb_Services/ServiceTypeServiceTest.php | 29 +- .../lib/Gocdb_Services/SiteServiceTest.php | 28 +- .../lib/Gocdb_Services/UserServiceTest.php | 24 +- tests/writeAPI/abstractClass.php | 16 +- tests/writeAPI/endpointMethods.php | 2 +- tests/writeAPI/serviceMethods.php | 2 +- tests/writeAPI/siteMethods.php | 2 +- 44 files changed, 1241 insertions(+), 980 deletions(-) diff --git a/.github/actions/mysql_bootstrap_pdo.php b/.github/actions/mysql_bootstrap_pdo.php index f9e2d3490..c2d642daf 100644 --- a/.github/actions/mysql_bootstrap_pdo.php +++ b/.github/actions/mysql_bootstrap_pdo.php @@ -12,9 +12,9 @@ /** * Returns the database connection to your test databse. * Modify as required to return a connection to your test db. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\Connection */ function getConnectionToTestDB() { $pdo = new PDO('mysql:host=172.18.0.1;dbname=doctrine;charset=UTF8', 'user', 'password'); - return new PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection($pdo); + return new PHPUnit\DbUnit\Database\DefaultConnection($pdo); } diff --git a/.github/actions/sqlite_bootstrap_pdo.php b/.github/actions/sqlite_bootstrap_pdo.php index bc25e9632..5cc74f322 100644 --- a/.github/actions/sqlite_bootstrap_pdo.php +++ b/.github/actions/sqlite_bootstrap_pdo.php @@ -12,12 +12,12 @@ /** * Returns the database connection to your test databse. * Modify as required to return a connection to your test db. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\DefaultConnection */ function getConnectionToTestDB() { $sqliteFile = '/tmp/gocdb.sqlite'; $pdo = new PDO("sqlite:" . $sqliteFile); - return new PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection($pdo, 'sqlite'); + return new PHPUnit\DbUnit\Database\DefaultConnection($pdo, 'sqlite'); } ?> diff --git a/composer.json b/composer.json index 3a1b9911f..2bdf3be40 100644 --- a/composer.json +++ b/composer.json @@ -7,8 +7,8 @@ "doctrine/annotations": "*" }, "require-dev": { - "phpunit/phpunit": "4.8.*", - "phpunit/dbunit": ">=1.2", + "phpunit/phpunit": "8.*", + "misantron/dbunit": "*", "phpmd/phpmd": "^2.13", "squizlabs/php_codesniffer": "^3.7", "taq/pdooci": "^1.0" diff --git a/composer.lock b/composer.lock index a3693bb6c..e6e49bf5b 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": "4187fdc3d979f5fbbd683f85a80c8941", + "content-hash": "8969d64a05bc23baf20a131dead6e449", "packages": [ { "name": "doctrine/annotations", @@ -2459,6 +2459,120 @@ ], "time": "2022-02-25T21:32:43+00:00" }, + { + "name": "misantron/dbunit", + "version": "5.2.1", + "source": { + "type": "git", + "url": "https://github.com/misantron/dbunit.git", + "reference": "2b68c5d1de61b8748cbcef610b939f02a7b9f453" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/misantron/dbunit/zipball/2b68c5d1de61b8748cbcef610b939f02a7b9f453", + "reference": "2b68c5d1de61b8748cbcef610b939f02a7b9f453", + "shasum": "" + }, + "require": { + "ext-pdo": "*", + "php": "^7.2 || ^8.0", + "phpunit/phpunit": "^8.5 || ^9.2", + "symfony/yaml": "^4.4 || ^5.0 || ^6.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.18 || ^3.3", + "php-coveralls/php-coveralls": "^2.5", + "phpstan/phpstan": "^1.2", + "squizlabs/php_codesniffer": "^3.6" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPUnit\\DbUnit\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aleksandr Ivanov", + "email": "misantron@gmail.com", + "role": "Developer" + } + ], + "description": "DbUnit fork supporting PHPUnit 8/9", + "keywords": [ + "database", + "dbUnit", + "testing" + ], + "support": { + "issues": "https://github.com/misantron/dbunit/issues", + "source": "https://github.com/misantron/dbunit/tree/5.2.1" + }, + "time": "2021-12-04T11:15:07+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.11.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2023-03-08T13:26:56+00:00" + }, { "name": "pdepend/pdepend", "version": "2.14.0", @@ -2523,169 +2637,115 @@ "time": "2023-05-26T13:15:18+00:00" }, { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", + "name": "phar-io/manifest", + "version": "2.0.3", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", "shasum": "" }, "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-2.x": "2.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" }, { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" } ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" }, - "time": "2021-10-19T17:43:47+00:00" + "time": "2021-07-20T11:28:43+00:00" }, { - "name": "phpdocumentor/type-resolver", - "version": "1.6.2", + "name": "phar-io/version", + "version": "3.2.1", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d" + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/48f445a408c131e38cab1c235aa6d2bb7a0bb20d", - "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { - "php": "^7.4 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-phpunit": "^1.1", - "phpunit/phpunit": "^9.5", - "rector/rector": "^0.13.9", - "vimeo/psalm": "^4.25" + "php": "^7.2 || ^8.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" } ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "description": "Library for handling version information and constraints", "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.2" + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" }, - "time": "2022-10-14T12:47:21+00:00" + "time": "2022-02-21T01:04:05+00:00" }, { "name": "phpmd/phpmd", @@ -2771,96 +2831,98 @@ "time": "2022-09-10T08:44:15+00:00" }, { - "name": "phpspec/prophecy", - "version": "v1.10.3", + "name": "phpunit/php-code-coverage", + "version": "7.0.15", "source": { "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "451c3cd1418cf640de218914901e51b064abb093" + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "819f92bba8b001d4363065928088de22f25a3a48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", - "reference": "451c3cd1418cf640de218914901e51b064abb093", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/819f92bba8b001d4363065928088de22f25a3a48", + "reference": "819f92bba8b001d4363065928088de22f25a3a48", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": ">=7.2", + "phpunit/php-file-iterator": "^2.0.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^3.1.3 || ^4.0", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^4.2.2", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1.3" }, "require-dev": { - "phpspec/phpspec": "^2.5 || ^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + "phpunit/phpunit": "^8.2.2" + }, + "suggest": { + "ext-xdebug": "^2.7.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.10.x-dev" + "dev-master": "7.0-dev" } }, "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" + "coverage", + "testing", + "xunit" ], "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.10.3" + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.15" }, - "time": "2020-03-05T15:02:03+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-07-26T12:20:09+00:00" }, { - "name": "phpunit/dbunit", - "version": "2.0.3", + "name": "phpunit/php-file-iterator", + "version": "2.0.5", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/dbunit.git", - "reference": "5c35d74549c21ba55d0ea74ba89d191a51f8cf25" + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/dbunit/zipball/5c35d74549c21ba55d0ea74ba89d191a51f8cf25", - "reference": "5c35d74549c21ba55d0ea74ba89d191a51f8cf25", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", + "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", "shasum": "" }, "require": { - "ext-pdo": "*", - "ext-simplexml": "*", - "php": "^5.4 || ^7.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0", - "symfony/yaml": "^2.1 || ^3.0" + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" }, - "bin": [ - "dbunit" - ], "type": "library", "extra": { "branch-alias": { @@ -2879,60 +2941,97 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], - "description": "DbUnit port for PHP/PHPUnit to support database interaction testing.", - "homepage": "https://github.com/sebastianbergmann/dbunit/", + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", "keywords": [ - "database", - "testing", - "xunit" + "filesystem", + "iterator" ], "support": { - "irc": "irc://irc.freenode.net/phpunit", - "issues": "https://github.com/sebastianbergmann/dbunit/issues", - "source": "https://github.com/sebastianbergmann/dbunit/tree/master" + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.5" }, - "abandoned": true, - "time": "2016-12-02T14:39:14+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:42:26+00:00" }, { - "name": "phpunit/php-code-coverage", - "version": "2.2.4", + "name": "phpunit/php-text-template", + "version": "1.2.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", "shasum": "" }, "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" + "php": ">=5.3.3" }, - "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + }, + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "2.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2.x-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -2947,45 +3046,52 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", "keywords": [ - "coverage", - "testing", - "xunit" + "timer" ], "support": { - "irc": "irc://irc.freenode.net/phpunit", - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/2.2" + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3" }, - "time": "2015-10-06T15:47:00+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:20:02+00:00" }, { - "name": "phpunit/php-file-iterator", - "version": "1.4.5", + "name": "phpunit/php-token-stream", + "version": "4.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3", + "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3", "shasum": "" }, "require": { - "php": ">=5.3.3" + "ext-tokenizer": "*", + "php": "^7.3 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -3000,41 +3106,81 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", "keywords": [ - "filesystem", - "iterator" + "tokenizer" ], "support": { - "irc": "irc://irc.freenode.net/phpunit", - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/1.4.5" + "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", + "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master" }, - "time": "2017-11-27T13:52:08+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "abandoned": true, + "time": "2020-08-04T08:28:15+00:00" }, { - "name": "phpunit/php-text-template", - "version": "1.2.1", + "name": "phpunit/phpunit", + "version": "8.5.33", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e", + "reference": "7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e", "shasum": "" }, "require": { - "php": ">=5.3.3" + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.0", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.2", + "phpunit/php-code-coverage": "^7.0.12", + "phpunit/php-file-iterator": "^2.0.4", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^2.1.2", + "sebastian/comparator": "^3.0.5", + "sebastian/diff": "^3.0.2", + "sebastian/environment": "^4.2.3", + "sebastian/exporter": "^3.1.5", + "sebastian/global-state": "^3.0.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^2.0.1", + "sebastian/type": "^1.1.3", + "sebastian/version": "^2.0.1" }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*", + "phpunit/php-invoker": "^2.0.0" + }, + "bin": [ + "phpunit" + ], "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.5-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -3051,41 +3197,57 @@ "role": "lead" } ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", "keywords": [ - "template" + "phpunit", + "testing", + "xunit" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.33" }, - "time": "2015-06-21T13:50:34+00:00" + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2023-02-27T13:04:50+00:00" }, { - "name": "phpunit/php-timer", - "version": "1.0.9", + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": ">=5.6" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { @@ -3100,46 +3262,122 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", + "description": "Looks up which function or method a line of code belongs to", + "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/1.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:15:22+00:00" + }, + { + "name": "sebastian/comparator", + "version": "3.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dc7ceb4a24aede938c7af2a9ed1de09609ca770", + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "sebastian/diff": "^3.0", + "sebastian/exporter": "^3.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", "keywords": [ - "timer" + "comparator", + "compare", + "equality" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/master" + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.5" }, - "time": "2017-02-26T11:10:40+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T12:31:48+00:00" }, { - "name": "phpunit/php-token-stream", - "version": "1.4.12", + "name": "sebastian/diff", + "version": "3.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16" + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "6296a0c086dd0117c1b78b059374d7fcbe7545ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16", - "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/6296a0c086dd0117c1b78b059374d7fcbe7545ae", + "reference": "6296a0c086dd0117c1b78b059374d7fcbe7545ae", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^2 || ^3.3 || ^4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -3155,65 +3393,59 @@ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ - "tokenizer" + "diff", + "udiff", + "unidiff", + "unified diff" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", - "source": "https://github.com/sebastianbergmann/php-token-stream/tree/1.4" + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/3.0.4" }, - "abandoned": true, - "time": "2017-12-04T08:55:13+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-05-07T05:30:20+00:00" }, { - "name": "phpunit/phpunit", - "version": "4.8.36", + "name": "sebastian/environment", + "version": "4.2.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "46023de9a91eec7dfb06cc56cb4e260017298517" + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517", - "reference": "46023de9a91eec7dfb06cc56cb4e260017298517", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~2.1", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.2.2", - "sebastian/diff": "~1.2", - "sebastian/environment": "~1.3", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.1|~3.0" + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5" }, "suggest": { - "phpunit/php-invoker": "~1.1" + "ext-posix": "*" }, - "bin": [ - "phpunit" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "4.8.x-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -3228,53 +3460,54 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", "keywords": [ - "phpunit", - "testing", - "xunit" + "Xdebug", + "environment", + "hhvm" ], "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/4.8.36" + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4" }, - "time": "2017-06-21T08:07:12+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:53:42+00:00" }, { - "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", + "name": "sebastian/exporter", + "version": "3.1.5", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/73a9676f2833b9a7c36968f9d882589cd75511e6", + "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" + "php": ">=7.0", + "sebastian/recursion-context": "^3.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "suggest": { - "ext-soap": "*" + "ext-mbstring": "*", + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3.x-dev" + "dev-master": "3.1.x-dev" } }, "autoload": { @@ -3289,50 +3522,73 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", "keywords": [ - "mock", - "xunit" + "export", + "exporter" ], "support": { - "irc": "irc://irc.freenode.net/phpunit", - "issues": "https://github.com/sebastianbergmann/phpunit-mock-objects/issues", - "source": "https://github.com/sebastianbergmann/phpunit-mock-objects/tree/2.3" + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.5" }, - "abandoned": true, - "time": "2015-10-02T06:51:40+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T06:00:17+00:00" }, { - "name": "sebastian/comparator", - "version": "1.2.4", + "name": "sebastian/global-state", + "version": "3.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "66783ce213de415b451b904bfef9dda0cf9aeae0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/66783ce213de415b451b904bfef9dda0cf9aeae0", + "reference": "66783ce213de415b451b904bfef9dda0cf9aeae0", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2 || ~2.0" + "php": ">=7.2", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "ext-dom": "*", + "phpunit/phpunit": "^8.0" + }, + "suggest": { + "ext-uopz": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -3345,60 +3601,54 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", "keywords": [ - "comparator", - "compare", - "equality" + "global state" ], "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/1.2" + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.3" }, - "time": "2017-01-29T09:50:25+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-08-02T09:23:32+00:00" }, { - "name": "sebastian/diff", - "version": "1.4.3", + "name": "sebastian/object-enumerator", + "version": "3.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", + "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": ">=7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -3411,50 +3661,49 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/1.4" + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4" }, - "time": "2017-05-22T07:24:03+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:40:27+00:00" }, { - "name": "sebastian/environment", - "version": "1.3.8", + "name": "sebastian/object-reflector", + "version": "1.1.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", + "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": ">=7.0" }, "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "1.1-dev" } }, "autoload": { @@ -3472,45 +3721,44 @@ "email": "sebastian@phpunit.de" } ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/1.3" + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2" }, - "time": "2016-08-18T05:49:44+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:37:18+00:00" }, { - "name": "sebastian/exporter", - "version": "1.2.2", + "name": "sebastian/recursion-context", + "version": "3.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb", + "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" + "php": ">=7.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -3523,66 +3771,54 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, { "name": "Adam Harvey", "email": "aharvey@php.net" } ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/master" + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1" }, - "time": "2016-06-17T09:04:28+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:34:24+00:00" }, { - "name": "sebastian/global-state", - "version": "1.1.1", + "name": "sebastian/resource-operations", + "version": "2.0.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", "shasum": "" }, "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "suggest": { - "ext-uopz": "*" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -3600,41 +3836,44 @@ "email": "sebastian@phpunit.de" } ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/1.1.1" + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2" }, - "time": "2015-10-12T03:26:01+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:30:19+00:00" }, { - "name": "sebastian/recursion-context", - "version": "1.0.5", + "name": "sebastian/type", + "version": "1.1.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4", + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.2" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^8.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1-dev" } }, "autoload": { @@ -3647,42 +3886,49 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/master" + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/1.1.4" }, - "time": "2016-10-03T07:41:43+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:25:11+00:00" }, { "name": "sebastian/version", - "version": "1.0.6", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", "shasum": "" }, + "require": { + "php": ">=5.6" + }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -3703,9 +3949,9 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/1.0.6" + "source": "https://github.com/sebastianbergmann/version/tree/master" }, - "time": "2015-06-21T13:59:46+00:00" + "time": "2016-10-03T07:35:21+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -3766,34 +4012,35 @@ }, { "name": "symfony/config", - "version": "v4.4.44", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "ed42f8f9da528d2c6cae36fe1f380b0c1d8f0658" + "reference": "8109892f27beed9252bd1f1c1880aeb4ad842650" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/ed42f8f9da528d2c6cae36fe1f380b0c1d8f0658", - "reference": "ed42f8f9da528d2c6cae36fe1f380b0c1d8f0658", + "url": "https://api.github.com/repos/symfony/config/zipball/8109892f27beed9252bd1f1c1880aeb4ad842650", + "reference": "8109892f27beed9252bd1f1c1880aeb4ad842650", "shasum": "" }, "require": { - "php": ">=7.1.3", - "symfony/filesystem": "^3.4|^4.0|^5.0", + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/filesystem": "^4.4|^5.0|^6.0", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-php80": "^1.16", "symfony/polyfill-php81": "^1.22" }, "conflict": { - "symfony/finder": "<3.4" + "symfony/finder": "<4.4" }, "require-dev": { - "symfony/event-dispatcher": "^3.4|^4.0|^5.0", - "symfony/finder": "^3.4|^4.0|^5.0", - "symfony/messenger": "^4.1|^5.0", - "symfony/service-contracts": "^1.1|^2", - "symfony/yaml": "^3.4|^4.0|^5.0" + "symfony/event-dispatcher": "^4.4|^5.0|^6.0", + "symfony/finder": "^4.4|^5.0|^6.0", + "symfony/messenger": "^4.4|^5.0|^6.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/yaml": "^4.4|^5.0|^6.0" }, "suggest": { "symfony/yaml": "To use the yaml reference dumper" @@ -3824,7 +4071,7 @@ "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/v4.4.44" + "source": "https://github.com/symfony/config/tree/v5.4.26" }, "funding": [ { @@ -3840,42 +4087,45 @@ "type": "tidelift" } ], - "time": "2022-07-20T09:59:04+00:00" + "time": "2023-07-19T20:21:11+00:00" }, { "name": "symfony/dependency-injection", - "version": "v4.4.37", + "version": "v5.4.28", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "c00a23904b42f140087d36e1d22c88801bb39689" + "reference": "addc22fed594f9ce04e73ef6a9d3e2416f77192d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/c00a23904b42f140087d36e1d22c88801bb39689", - "reference": "c00a23904b42f140087d36e1d22c88801bb39689", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/addc22fed594f9ce04e73ef6a9d3e2416f77192d", + "reference": "addc22fed594f9ce04e73ef6a9d3e2416f77192d", "shasum": "" }, "require": { - "php": ">=7.1.3", - "psr/container": "^1.0", + "php": ">=7.2.5", + "psr/container": "^1.1.1", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-php80": "^1.16", + "symfony/polyfill-php81": "^1.22", "symfony/service-contracts": "^1.1.6|^2" }, "conflict": { - "symfony/config": "<4.3|>=5.0", - "symfony/finder": "<3.4", - "symfony/proxy-manager-bridge": "<3.4", - "symfony/yaml": "<3.4" + "ext-psr": "<1.1|>=2", + "symfony/config": "<5.3", + "symfony/finder": "<4.4", + "symfony/proxy-manager-bridge": "<4.4", + "symfony/yaml": "<4.4.26" }, "provide": { "psr/container-implementation": "1.0", "symfony/service-implementation": "1.0|2.0" }, "require-dev": { - "symfony/config": "^4.3", - "symfony/expression-language": "^3.4|^4.0|^5.0", - "symfony/yaml": "^4.4|^5.0" + "symfony/config": "^5.3|^6.0", + "symfony/expression-language": "^4.4|^5.0|^6.0", + "symfony/yaml": "^4.4.26|^5.0|^6.0" }, "suggest": { "symfony/config": "", @@ -3910,7 +4160,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v4.4.37" + "source": "https://github.com/symfony/dependency-injection/tree/v5.4.28" }, "funding": [ { @@ -3926,7 +4176,7 @@ "type": "tidelift" } ], - "time": "2022-01-24T17:17:45+00:00" + "time": "2023-08-14T10:47:38+00:00" }, { "name": "symfony/filesystem", @@ -4073,31 +4323,35 @@ }, { "name": "symfony/yaml", - "version": "v3.4.47", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "88289caa3c166321883f67fe5130188ebbb47094" + "reference": "4cd2e3ea301aadd76a4172756296fe552fb45b0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/88289caa3c166321883f67fe5130188ebbb47094", - "reference": "88289caa3c166321883f67fe5130188ebbb47094", + "url": "https://api.github.com/repos/symfony/yaml/zipball/4cd2e3ea301aadd76a4172756296fe552fb45b0b", + "reference": "4cd2e3ea301aadd76a4172756296fe552fb45b0b", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/polyfill-ctype": "~1.8" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "symfony/console": "<3.4" + "symfony/console": "<5.3" }, "require-dev": { - "symfony/console": "~3.4|~4.0" + "symfony/console": "^5.3|^6.0" }, "suggest": { "symfony/console": "For validating YAML files using the lint command" }, + "bin": [ + "Resources/bin/yaml-lint" + ], "type": "library", "autoload": { "psr-4": { @@ -4121,10 +4375,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Yaml Component", + "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v3.4.47" + "source": "https://github.com/symfony/yaml/tree/v5.4.23" }, "funding": [ { @@ -4140,7 +4394,7 @@ "type": "tidelift" } ], - "time": "2020-10-24T10:57:07+00:00" + "time": "2023-04-23T19:33:36+00:00" }, { "name": "taq/pdooci", @@ -4192,62 +4446,54 @@ "time": "2020-08-17T10:56:36+00:00" }, { - "name": "webmozart/assert", - "version": "1.11.0", + "name": "theseer/tokenizer", + "version": "1.2.1", "source": { "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", "shasum": "" }, "require": { - "ext-ctype": "*", + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", "php": "^7.2 || ^8.0" }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" } ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.11.0" + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" }, - "time": "2022-06-03T18:03:27+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" } ], "aliases": [], diff --git a/tests/DoctrineTestSuite1.php b/tests/DoctrineTestSuite1.php index a7d11af27..db90f36f2 100644 --- a/tests/DoctrineTestSuite1.php +++ b/tests/DoctrineTestSuite1.php @@ -35,7 +35,7 @@ require_once __DIR__ . '/resourcesTests/ManageUnusedAPICredentialsTest.php'; require_once __DIR__ . '/resourcesTests/ManageUnrenewedAPICredentialsTest.php'; -use PHPUnit_Framework_TestSuite; +use \PHPUnit\Framework\TestSuite; /** * TestSuite designed to run the main doctrine tests @@ -48,7 +48,7 @@ public static function suite() echo "\n\n-------------------------------------------------\n"; echo "Executing Test Suite 1\n"; - $suite = new PHPUnit_Framework_TestSuite('Test Suite 1'); + $suite = new \PHPUnit\Framework\TestSuite('Test Suite 1'); $suite->addTestSuite('DoctrineCleanInsert1Test'); $suite->addTestSuite('NGIServiceTest'); diff --git a/tests/README.md b/tests/README.md index a5e16e998..1619f37cd 100644 --- a/tests/README.md +++ b/tests/README.md @@ -5,7 +5,7 @@ This file is best viewed using a browser-plugin for markdown `.md` files. GocDB comes with a suite of tests that can be run to validate that Doctrine and your chosen database operate as expected. If the test suite fails against your chosen DB, then GocDB will not work as expected. It is therefore recommended -that you run the DBUnit tests to ensure GocDB works as expected against your chosen DB. +that you run the DBUnit tests to ensure GocDB works as expected against your chosen DB. Install PhpUnit and DBUnit --------------------------- @@ -20,20 +20,20 @@ If you see an error like the following, it is likely that you haven't installed DBUnit extensions or the phpunit on the path does not have the DBUnit extensions. ```bash -Fatal error: Class 'PHPUnit_Extensions_Database_TestCase' not found in ...... +Fatal error: Class 'PHPUnit\DbUnit\TestCase' not found in ...... ``` Install PDO Driver for your test DB ------------------------------------ -The tests require installation of the correct php PDO driver, see: http://php.net/manual/en/pdo.installation.php +The tests require installation of the correct php PDO driver, see: http://php.net/manual/en/pdo.installation.php PDO is used to assert that Doctrine performs the GocDB logic against your DB in the expected way. It uses Php Data Objects (PDO) to connect to your DB -and runs plain SQL to perform assertions. +and runs plain SQL to perform assertions. ### OCIPDO for Oracle For unix derivative systems, the PDO driver for Oracle (normally) requires compiling into php, see: http://php.net/manual/en/ref.pdo-oci.php -This is inconvenient and so the 'pdooci' util lib (https://github.com/taq/pdooci) is provided as a 'require-dev' dependency in the composer.json file (see INSTALL.md). -This util lib means you don't need to compile the driver --with-pdo-oci +This is inconvenient and so the 'pdooci' util lib (https://github.com/taq/pdooci) is provided as a 'require-dev' dependency in the composer.json file (see INSTALL.md). +This util lib means you don't need to compile the driver --with-pdo-oci Deploy A Database For Testing -------------------------- @@ -51,9 +51,9 @@ Configure Doctrine and PDO for your Test DB and modify the connection details for the ***same test database***. This second file is used to assert that Doctrine performs the GocDB logic against your DB in the expected way. It uses Php Data Objects (PDO) to connect to your DB - and runs plain SQL to perform assertions. + and runs plain SQL to perform assertions. -Note that the two bootstrap files are linked: the PDOOCI\PDO class in bootstrap_pdo.php is made available by composer's vendor/autoload.php in bootstrap_doctrine.php. So the autoload MUST be uncommented. +Note that the two bootstrap files are linked: the PDOOCI\PDO class in bootstrap_pdo.php is made available by composer's vendor/autoload.php in bootstrap_doctrine.php. So the autoload MUST be uncommented. Deploy Tables/Schema via Doctrine --------------------------------------- diff --git a/tests/doctrine/DoctrineCleanInsert1Test.php b/tests/doctrine/DoctrineCleanInsert1Test.php index 1a8516aad..4b9e0a89a 100644 --- a/tests/doctrine/DoctrineCleanInsert1Test.php +++ b/tests/doctrine/DoctrineCleanInsert1Test.php @@ -17,7 +17,7 @@ * @author David Meredith * @author Johnn Casson */ -class DoctrineCleanInsert1Test extends PHPUnit_Extensions_Database_TestCase +class DoctrineCleanInsert1Test extends PHPUnit\DbUnit\TestCase { private $em; private $egiScope; @@ -27,7 +27,7 @@ class DoctrineCleanInsert1Test extends PHPUnit_Extensions_Database_TestCase /** * Overridden. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); @@ -37,7 +37,7 @@ public static function setUpBeforeClass() /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { @@ -48,13 +48,13 @@ protected function getConnection() /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { return $this->createFlatXMLDataSet(dirname(__FILE__) . '/truncateDataTables.xml'); // Use below to return an empty data set if we don't want to truncate and seed - //return new PHPUnit_Extensions_Database_DataSet_DefaultDataSet(); + //return new PHPUnit\DbUnit\DataSet\DefaultDataSet(); } /** @@ -63,14 +63,14 @@ protected function getDataSet() protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements // and also do not allow truncates across tables with FK contstraints e.g. Oracle) - return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(); + return PHPUnit\DbUnit\Operation\Factory::DELETE_ALL(); } /** @@ -79,14 +79,14 @@ protected function getSetUpOperation() protected function getTearDownOperation() { // NONE is default - return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + return PHPUnit\DbUnit\Operation\Factory::NONE(); } /** * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->em = $this->createEntityManager(); @@ -95,7 +95,7 @@ protected function setUp() /** * Run after each test function to prevent pile-up of database connections. */ - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); if (!is_null($this->em)) { @@ -117,7 +117,7 @@ private function createEntityManager() * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() + protected function assertPreConditions(): void { $con = $this->getConnection(); $fixture = dirname(__FILE__) . '/truncateDataTables.xml'; diff --git a/tests/doctrine/DowntimeServiceEndpointTest1.php b/tests/doctrine/DowntimeServiceEndpointTest1.php index 00b06dc83..67d34b5fd 100644 --- a/tests/doctrine/DowntimeServiceEndpointTest1.php +++ b/tests/doctrine/DowntimeServiceEndpointTest1.php @@ -13,14 +13,14 @@ * * @author David Meredith */ -class DowntimeServiceEndpointTest1 extends PHPUnit_Extensions_Database_TestCase +class DowntimeServiceEndpointTest1 extends PHPUnit\DbUnit\TestCase { private $em; /** * Overridden. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; @@ -29,7 +29,7 @@ public static function setUpBeforeClass() /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { @@ -40,13 +40,13 @@ protected function getConnection() /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { return $this->createFlatXMLDataSet(dirname(__FILE__) . '/truncateDataTables.xml'); // Use below to return an empty data set if we don't want to truncate and seed - //return new PHPUnit_Extensions_Database_DataSet_DefaultDataSet(); + //return new PHPUnit\DbUnit\DataSet\DefaultDataSet(); } /** @@ -55,14 +55,14 @@ protected function getDataSet() protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements // and also do not allow truncates across tables with FK contstraints e.g. Oracle) - return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(); + return PHPUnit\DbUnit\Operation\Factory::DELETE_ALL(); } /** @@ -71,14 +71,14 @@ protected function getSetUpOperation() protected function getTearDownOperation() { // NONE is default - return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + return PHPUnit\DbUnit\Operation\Factory::NONE(); } /** * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->em = $this->createEntityManager(); @@ -86,7 +86,7 @@ protected function setUp() /** * Run after each test function to prevent pile-up of database connections. */ - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); if (!is_null($this->em)) { @@ -107,7 +107,7 @@ private function createEntityManager() * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() + protected function assertPreConditions(): void { $con = $this->getConnection(); $fixture = dirname(__FILE__) . '/truncateDataTables.xml'; diff --git a/tests/doctrine/ExtensionProps_IPIQuery_Test1.php b/tests/doctrine/ExtensionProps_IPIQuery_Test1.php index 4f0947779..da193c906 100644 --- a/tests/doctrine/ExtensionProps_IPIQuery_Test1.php +++ b/tests/doctrine/ExtensionProps_IPIQuery_Test1.php @@ -27,14 +27,14 @@ * * @author David Meredith */ -class ExtensionProps_IPIQuery_Test1 extends PHPUnit_Extensions_Database_TestCase { +class ExtensionProps_IPIQuery_Test1 extends PHPUnit\DbUnit\TestCase { private $em; /** * Overridden. */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; echo "Executing ExtensionProps_IPIQuery_Test1. . .\n"; @@ -42,7 +42,7 @@ public static function setUpBeforeClass() { /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { require_once dirname(__FILE__) . '/bootstrap_pdo.php'; @@ -52,12 +52,12 @@ protected function getConnection() { /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { return $this->createFlatXMLDataSet(dirname(__FILE__) . '/truncateDataTables.xml'); // Use below to return an empty data set if we don't want to truncate and seed - //return new PHPUnit_Extensions_Database_DataSet_DefaultDataSet(); + //return new PHPUnit\DbUnit\DataSet\DefaultDataSet(); } /** @@ -65,14 +65,14 @@ protected function getDataSet() { */ protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements // and also do not allow truncates across tables with FK contstraints e.g. Oracle) - return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(); + return PHPUnit\DbUnit\Operation\Factory::DELETE_ALL(); } /** @@ -80,14 +80,14 @@ protected function getSetUpOperation() { */ protected function getTearDownOperation() { // NONE is default - return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + return PHPUnit\DbUnit\Operation\Factory::NONE(); } /** * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->em = $this->createEntityManager(); } @@ -104,7 +104,7 @@ private function createEntityManager() { * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() { + protected function assertPreConditions(): void { $con = $this->getConnection(); $fixture = dirname(__FILE__) . '/truncateDataTables.xml'; $tables = simplexml_load_file($fixture); diff --git a/tests/doctrine/ExtensionsTest.php b/tests/doctrine/ExtensionsTest.php index a048916ca..b66305589 100644 --- a/tests/doctrine/ExtensionsTest.php +++ b/tests/doctrine/ExtensionsTest.php @@ -14,14 +14,14 @@ * * @author James McCarthy */ -class ExtensionsTest extends PHPUnit_Extensions_Database_TestCase +class ExtensionsTest extends PHPUnit\DbUnit\TestCase { private $em; /** * Overridden. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; @@ -30,7 +30,7 @@ public static function setUpBeforeClass() /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { @@ -41,7 +41,7 @@ protected function getConnection() /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { @@ -54,14 +54,14 @@ protected function getDataSet() protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements // and also do not allow truncates across tables with FK contstraints e.g. Oracle) - return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(); + return PHPUnit\DbUnit\Operation\Factory::DELETE_ALL(); } /** @@ -70,14 +70,14 @@ protected function getSetUpOperation() protected function getTearDownOperation() { // NONE is default - return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + return PHPUnit\DbUnit\Operation\Factory::NONE(); } /** * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->em = $this->createEntityManager(); @@ -85,7 +85,7 @@ protected function setUp() /** * Run after each test function to prevent pile-up of database connections. */ - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); if (!is_null($this->em)) { @@ -106,7 +106,7 @@ private function createEntityManager() * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() + protected function assertPreConditions(): void { $con = $this->getConnection(); $fixture = dirname(__FILE__) . '/truncateDataTables.xml'; diff --git a/tests/doctrine/NGIServiceTest.php b/tests/doctrine/NGIServiceTest.php index 77fb0d4fa..81c7615e9 100644 --- a/tests/doctrine/NGIServiceTest.php +++ b/tests/doctrine/NGIServiceTest.php @@ -13,14 +13,14 @@ * * @author David Meredith */ -class NGIServiceTest extends PHPUnit_Extensions_Database_TestCase +class NGIServiceTest extends PHPUnit\DbUnit\TestCase { private $em; /** * Overridden. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; @@ -29,7 +29,7 @@ public static function setUpBeforeClass() /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { @@ -40,13 +40,13 @@ protected function getConnection() /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { return $this->createFlatXMLDataSet(dirname(__FILE__) . '/truncateDataTables.xml'); // Use below to return an empty data set if we don't want to truncate and seed - //return new PHPUnit_Extensions_Database_DataSet_DefaultDataSet(); + //return new PHPUnit\DbUnit\DataSet\DefaultDataSet(); } /** @@ -55,14 +55,14 @@ protected function getDataSet() protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements // and also do not allow truncates across tables with FK contstraints e.g. Oracle) - return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(); + return PHPUnit\DbUnit\Operation\Factory::DELETE_ALL(); } /** @@ -71,14 +71,14 @@ protected function getSetUpOperation() protected function getTearDownOperation() { // NONE is default - return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + return PHPUnit\DbUnit\Operation\Factory::NONE(); } /** * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->em = $this->createEntityManager(); @@ -86,7 +86,7 @@ protected function setUp() /** * Run after each test function to prevent pile-up of database connections. */ - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); if (!is_null($this->em)) { @@ -107,7 +107,7 @@ private function createEntityManager() * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() + protected function assertPreConditions(): void { $con = $this->getConnection(); $fixture = dirname(__FILE__) . '/truncateDataTables.xml'; diff --git a/tests/doctrine/RoleActionRecordTests.php b/tests/doctrine/RoleActionRecordTests.php index 8ce8bffcd..9656d9483 100644 --- a/tests/doctrine/RoleActionRecordTests.php +++ b/tests/doctrine/RoleActionRecordTests.php @@ -26,14 +26,14 @@ * * @author David Meredith */ -class RoleActionRecordTests extends PHPUnit_Extensions_Database_TestCase { +class RoleActionRecordTests extends PHPUnit\DbUnit\TestCase { private $em; /** * Overridden. */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; echo "Executing RoleActionRecordTests. . .\n"; @@ -41,7 +41,7 @@ public static function setUpBeforeClass() { /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { require_once dirname(__FILE__) . '/bootstrap_pdo.php'; @@ -51,7 +51,7 @@ protected function getConnection() { /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { return $this->createFlatXMLDataSet(dirname(__FILE__) . '/truncateDataTables.xml'); @@ -62,14 +62,14 @@ protected function getDataSet() { */ protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements // and also do not allow truncates across tables with FK contstraints e.g. Oracle) - return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(); + return PHPUnit\DbUnit\Operation\Factory::DELETE_ALL(); } /** @@ -77,14 +77,14 @@ protected function getSetUpOperation() { */ protected function getTearDownOperation() { // NONE is default - return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + return PHPUnit\DbUnit\Operation\Factory::NONE(); } /** * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->em = $this->createEntityManager(); } @@ -102,7 +102,7 @@ private function createEntityManager() { * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() { + protected function assertPreConditions(): void { $con = $this->getConnection(); $fixture = dirname(__FILE__) . '/truncateDataTables.xml'; $tables = simplexml_load_file($fixture); diff --git a/tests/doctrine/RoleCascadeDeletionsTest.php b/tests/doctrine/RoleCascadeDeletionsTest.php index ef14c6b2e..ceaf57435 100644 --- a/tests/doctrine/RoleCascadeDeletionsTest.php +++ b/tests/doctrine/RoleCascadeDeletionsTest.php @@ -25,14 +25,14 @@ * * @author David Meredith */ -class RoleCascadeDeletionsTest extends PHPUnit_Extensions_Database_TestCase +class RoleCascadeDeletionsTest extends PHPUnit\DbUnit\TestCase { private $em; /** * Overridden. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; @@ -41,7 +41,7 @@ public static function setUpBeforeClass() /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { @@ -52,13 +52,13 @@ protected function getConnection() /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { return $this->createFlatXMLDataSet(dirname(__FILE__) . '/truncateDataTables.xml'); // Use below to return an empty data set if we don't want to truncate and seed - //return new PHPUnit_Extensions_Database_DataSet_DefaultDataSet(); + //return new PHPUnit\DbUnit\DataSet\DefaultDataSet(); } /** @@ -67,14 +67,14 @@ protected function getDataSet() protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements // and also do not allow truncates across tables with FK contstraints e.g. Oracle) - return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(); + return PHPUnit\DbUnit\Operation\Factory::DELETE_ALL(); } /** @@ -83,14 +83,14 @@ protected function getSetUpOperation() protected function getTearDownOperation() { // NONE is default - return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + return PHPUnit\DbUnit\Operation\Factory::NONE(); } /** * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->em = $this->createEntityManager(); @@ -98,7 +98,7 @@ protected function setUp() /** * Run after each test function to prevent pile-up of database connections. */ - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); if (!is_null($this->em)) { @@ -119,7 +119,7 @@ private function createEntityManager() * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() + protected function assertPreConditions(): void { $con = $this->getConnection(); $fixture = dirname(__FILE__) . '/truncateDataTables.xml'; diff --git a/tests/doctrine/RoleServiceTest.php b/tests/doctrine/RoleServiceTest.php index 6dc6252cb..847609fa7 100644 --- a/tests/doctrine/RoleServiceTest.php +++ b/tests/doctrine/RoleServiceTest.php @@ -19,7 +19,7 @@ * @author David Meredith * @author John Casson */ -class RoleServiceTest extends PHPUnit_Extensions_Database_TestCase +class RoleServiceTest extends PHPUnit\DbUnit\TestCase { private $em; private $egiScope; @@ -30,7 +30,7 @@ class RoleServiceTest extends PHPUnit_Extensions_Database_TestCase /** * Overridden. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; @@ -39,7 +39,7 @@ public static function setUpBeforeClass() /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { @@ -50,13 +50,13 @@ protected function getConnection() /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { return $this->createFlatXMLDataSet(dirname(__FILE__) . '/truncateDataTables.xml'); // Use below to return an empty data set if we don't want to truncate and seed - //return new PHPUnit_Extensions_Database_DataSet_DefaultDataSet(); + //return new PHPUnit\DbUnit\DataSet\DefaultDataSet(); } /** @@ -65,14 +65,14 @@ protected function getDataSet() protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements // and also do not allow truncates across tables with FK contstraints e.g. Oracle) - return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(); + return PHPUnit\DbUnit\Operation\Factory::DELETE_ALL(); } /** @@ -81,14 +81,14 @@ protected function getSetUpOperation() protected function getTearDownOperation() { // NONE is default - return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + return PHPUnit\DbUnit\Operation\Factory::NONE(); } /** * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->em = $this->createEntityManager(); @@ -96,7 +96,7 @@ protected function setUp() /** * Run after each test function to prevent pile-up of database connections. */ - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); if (!is_null($this->em)) { @@ -117,7 +117,7 @@ private function createEntityManager() * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() + protected function assertPreConditions(): void { $con = $this->getConnection(); $fixture = dirname(__FILE__) . '/truncateDataTables.xml'; diff --git a/tests/doctrine/RolesTest.php b/tests/doctrine/RolesTest.php index 93d5d72dc..e9537de26 100644 --- a/tests/doctrine/RolesTest.php +++ b/tests/doctrine/RolesTest.php @@ -19,7 +19,7 @@ * @author David Meredith * @author John Casson */ -class RolesTest extends PHPUnit_Extensions_Database_TestCase +class RolesTest extends PHPUnit\DbUnit\TestCase { private $em; private $egiScope; @@ -29,7 +29,7 @@ class RolesTest extends PHPUnit_Extensions_Database_TestCase /** * Overridden. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; @@ -38,7 +38,7 @@ public static function setUpBeforeClass() /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { @@ -49,13 +49,13 @@ protected function getConnection() /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { return $this->createFlatXMLDataSet(dirname(__FILE__) . '/truncateDataTables.xml'); // Use below to return an empty data set if we don't want to truncate and seed - //return new PHPUnit_Extensions_Database_DataSet_DefaultDataSet(); + //return new PHPUnit\DbUnit\DataSet\DefaultDataSet(); } /** @@ -64,14 +64,14 @@ protected function getDataSet() protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements // and also do not allow truncates across tables with FK contstraints e.g. Oracle) - return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(); + return PHPUnit\DbUnit\Operation\Factory::DELETE_ALL(); } /** @@ -80,14 +80,14 @@ protected function getSetUpOperation() protected function getTearDownOperation() { // NONE is default - return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + return PHPUnit\DbUnit\Operation\Factory::NONE(); } /** * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->em = $this->createEntityManager(); @@ -95,7 +95,7 @@ protected function setUp() /** * Run after each test function to prevent pile-up of database connections. */ - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); if (!is_null($this->em)) { @@ -116,7 +116,7 @@ private function createEntityManager() * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() + protected function assertPreConditions(): void { $con = $this->getConnection(); $fixture = dirname(__FILE__) . '/truncateDataTables.xml'; diff --git a/tests/doctrine/Scoped_IPIQuery_Test1.php b/tests/doctrine/Scoped_IPIQuery_Test1.php index cab6333e1..2fac21c5a 100644 --- a/tests/doctrine/Scoped_IPIQuery_Test1.php +++ b/tests/doctrine/Scoped_IPIQuery_Test1.php @@ -19,14 +19,14 @@ * * @author David Meredith */ -class Scoped_IPIQuery_Test1 extends PHPUnit_Extensions_Database_TestCase +class Scoped_IPIQuery_Test1 extends PHPUnit\DbUnit\TestCase { private $em; /** * Overridden. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; @@ -35,7 +35,7 @@ public static function setUpBeforeClass() /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { @@ -46,13 +46,13 @@ protected function getConnection() /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { return $this->createFlatXMLDataSet(dirname(__FILE__) . '/truncateDataTables.xml'); // Use below to return an empty data set if we don't want to truncate and seed - //return new PHPUnit_Extensions_Database_DataSet_DefaultDataSet(); + //return new PHPUnit\DbUnit\DataSet\DefaultDataSet(); } /** @@ -61,14 +61,14 @@ protected function getDataSet() protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements // and also do not allow truncates across tables with FK contstraints e.g. Oracle) - return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(); + return PHPUnit\DbUnit\Operation\Factory::DELETE_ALL(); } /** @@ -77,14 +77,14 @@ protected function getSetUpOperation() protected function getTearDownOperation() { // NONE is default - return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + return PHPUnit\DbUnit\Operation\Factory::NONE(); } /** * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->em = $this->createEntityManager(); @@ -92,7 +92,7 @@ protected function setUp() /** * Run after each test function to prevent pile-up of database connections. */ - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); if (!is_null($this->em)) { @@ -112,7 +112,7 @@ private function createEntityManager() * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() + protected function assertPreConditions(): void { $con = $this->getConnection(); $fixture = dirname(__FILE__) . '/truncateDataTables.xml'; diff --git a/tests/doctrine/ServiceDAOTest.php b/tests/doctrine/ServiceDAOTest.php index 74d62d121..15a70b934 100644 --- a/tests/doctrine/ServiceDAOTest.php +++ b/tests/doctrine/ServiceDAOTest.php @@ -14,14 +14,14 @@ * * @author David Meredith */ -class ServiceDAOTest extends PHPUnit_Extensions_Database_TestCase +class ServiceDAOTest extends PHPUnit\DbUnit\TestCase { private $em; /** * Overridden. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; @@ -30,7 +30,7 @@ public static function setUpBeforeClass() /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { @@ -41,13 +41,13 @@ protected function getConnection() /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { return $this->createFlatXMLDataSet(dirname(__FILE__) . '/truncateDataTables.xml'); // Use below to return an empty data set if we don't want to truncate and seed - //return new PHPUnit_Extensions_Database_DataSet_DefaultDataSet(); + //return new PHPUnit\DbUnit\DataSet\DefaultDataSet(); } /** @@ -56,14 +56,14 @@ protected function getDataSet() protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements // and also do not allow truncates across tables with FK contstraints e.g. Oracle) - return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(); + return PHPUnit\DbUnit\Operation\Factory::DELETE_ALL(); } /** @@ -72,14 +72,14 @@ protected function getSetUpOperation() protected function getTearDownOperation() { // NONE is default - return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + return PHPUnit\DbUnit\Operation\Factory::NONE(); } /** * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->em = $this->createEntityManager(); @@ -87,7 +87,7 @@ protected function setUp() /** * Run after each test function to prevent pile-up of database connections. */ - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); if (!is_null($this->em)) { @@ -109,7 +109,7 @@ private function createEntityManager() * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() + protected function assertPreConditions(): void { $con = $this->getConnection(); $fixture = dirname(__FILE__) . '/truncateDataTables.xml'; diff --git a/tests/doctrine/ServiceMoveTest.php b/tests/doctrine/ServiceMoveTest.php index 46c94419d..fbf676859 100644 --- a/tests/doctrine/ServiceMoveTest.php +++ b/tests/doctrine/ServiceMoveTest.php @@ -14,7 +14,7 @@ * @author David Meredith * @author John Casson */ -class ServiceMoveTest extends PHPUnit_Extensions_Database_TestCase +class ServiceMoveTest extends PHPUnit\DbUnit\TestCase { private $em; private $egiScope; @@ -25,7 +25,7 @@ class ServiceMoveTest extends PHPUnit_Extensions_Database_TestCase /** * Overridden. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; @@ -34,7 +34,7 @@ public static function setUpBeforeClass() /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { @@ -45,13 +45,13 @@ protected function getConnection() /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { return $this->createFlatXMLDataSet(dirname(__FILE__) . '/truncateDataTables.xml'); // Use below to return an empty data set if we don't want to truncate and seed - //return new PHPUnit_Extensions_Database_DataSet_DefaultDataSet(); + //return new PHPUnit\DbUnit\DataSet\DefaultDataSet(); } /** @@ -60,14 +60,14 @@ protected function getDataSet() protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements // and also do not allow truncates across tables with FK contstraints e.g. Oracle) - return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(); + return PHPUnit\DbUnit\Operation\Factory::DELETE_ALL(); } /** @@ -76,14 +76,14 @@ protected function getSetUpOperation() protected function getTearDownOperation() { // NONE is default - return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + return PHPUnit\DbUnit\Operation\Factory::NONE(); } /** * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->em = $this->createEntityManager(); @@ -91,7 +91,7 @@ protected function setUp() /** * Run after each test function to prevent pile-up of database connections. */ - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); if (!is_null($this->em)) { @@ -112,7 +112,7 @@ private function createEntityManager() * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() + protected function assertPreConditions(): void { $con = $this->getConnection(); $fixture = dirname(__FILE__) . '/truncateDataTables.xml'; diff --git a/tests/doctrine/ServiceTypeTest.php b/tests/doctrine/ServiceTypeTest.php index 801dcaa9a..588275589 100644 --- a/tests/doctrine/ServiceTypeTest.php +++ b/tests/doctrine/ServiceTypeTest.php @@ -8,8 +8,8 @@ require_once dirname(__FILE__) . '/TestUtil.php'; use Doctrine\ORM\EntityManager; -use PHPUnit_Extensions_Database_Operation_Factory; -use PHPUnit_Extensions_Database_TestCase; +use PHPUnit\DbUnit\Operation\Factory; +use \PHPUnit\DbUnit\TestCase; use RuntimeException; use TestUtil; // Extensive changes needed to put TestUtil in org\gocdb\tests; @@ -21,14 +21,14 @@ * * @author David Meredith */ -class ServiceTypeTest extends PHPUnit_Extensions_Database_TestCase +class ServiceTypeTest extends \PHPUnit\DbUnit\TestCase { private $em; /** * Overridden. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; @@ -37,7 +37,7 @@ public static function setUpBeforeClass() /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { @@ -48,7 +48,7 @@ protected function getConnection() /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { @@ -61,14 +61,14 @@ protected function getDataSet() protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements // and also do not allow truncates across tables with FK contstraints e.g. Oracle) - return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(); + return PHPUnit\DbUnit\Operation\Factory::DELETE_ALL(); } /** @@ -77,14 +77,14 @@ protected function getSetUpOperation() protected function getTearDownOperation() { // NONE is default - return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + return PHPUnit\DbUnit\Operation\Factory::NONE(); } /** * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->em = $this->createEntityManager(); @@ -105,7 +105,7 @@ private function createEntityManager() * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() + protected function assertPreConditions(): void { $con = $this->getConnection(); $fixture = dirname(__FILE__) . '/truncateDataTables.xml'; diff --git a/tests/doctrine/SiteMoveTest.php b/tests/doctrine/SiteMoveTest.php index 38fcd0b11..362370bcf 100644 --- a/tests/doctrine/SiteMoveTest.php +++ b/tests/doctrine/SiteMoveTest.php @@ -20,7 +20,7 @@ * @author David Meredith * @author John Casson */ -class SiteMoveTest extends PHPUnit_Extensions_Database_TestCase +class SiteMoveTest extends PHPUnit\DbUnit\TestCase { private $em; private $egiScope; @@ -31,7 +31,7 @@ class SiteMoveTest extends PHPUnit_Extensions_Database_TestCase /** * Overridden. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; @@ -40,7 +40,7 @@ public static function setUpBeforeClass() /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { @@ -51,13 +51,13 @@ protected function getConnection() /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { return $this->createFlatXMLDataSet(dirname(__FILE__) . '/truncateDataTables.xml'); // Use below to return an empty data set if we don't want to truncate and seed - //return new PHPUnit_Extensions_Database_DataSet_DefaultDataSet(); + //return new PHPUnit\DbUnit\DataSet\DefaultDataSet(); } /** @@ -66,14 +66,14 @@ protected function getDataSet() protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements // and also do not allow truncates across tables with FK contstraints e.g. Oracle) - return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(); + return PHPUnit\DbUnit\Operation\Factory::DELETE_ALL(); } /** @@ -82,14 +82,14 @@ protected function getSetUpOperation() protected function getTearDownOperation() { // NONE is default - return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + return PHPUnit\DbUnit\Operation\Factory::NONE(); } /** * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->em = $this->createEntityManager(); @@ -97,7 +97,7 @@ protected function setUp() /** * Run after each test function to prevent pile-up of database connections. */ - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); if (!is_null($this->em)) { @@ -119,7 +119,7 @@ private function createEntityManager() * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() + protected function assertPreConditions(): void { $con = $this->getConnection(); $fixture = dirname(__FILE__) . '/truncateDataTables.xml'; diff --git a/tests/doctrine/Site_CertStatusLogCascadeDeletionsTest.php b/tests/doctrine/Site_CertStatusLogCascadeDeletionsTest.php index 845b3eaef..d8310fee8 100644 --- a/tests/doctrine/Site_CertStatusLogCascadeDeletionsTest.php +++ b/tests/doctrine/Site_CertStatusLogCascadeDeletionsTest.php @@ -22,7 +22,7 @@ * * @author David Meredith */ -class Site_CertStatusLogCascadeDeletionsTest extends PHPUnit_Extensions_Database_TestCase +class Site_CertStatusLogCascadeDeletionsTest extends PHPUnit\DbUnit\TestCase { private $em; @@ -33,7 +33,7 @@ class Site_CertStatusLogCascadeDeletionsTest extends PHPUnit_Extensions_Database /** * Overridden. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; @@ -42,7 +42,7 @@ public static function setUpBeforeClass() /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { @@ -53,13 +53,13 @@ protected function getConnection() /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { return $this->createFlatXMLDataSet(dirname(__FILE__) . '/truncateDataTables.xml'); // Use below to return an empty data set if we don't want to truncate and seed - //return new PHPUnit_Extensions_Database_DataSet_DefaultDataSet(); + //return new PHPUnit\DbUnit\DataSet\DefaultDataSet(); } /** @@ -68,14 +68,14 @@ protected function getDataSet() protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements // and also do not allow truncates across tables with FK contstraints e.g. Oracle) - return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(); + return PHPUnit\DbUnit\Operation\Factory::DELETE_ALL(); } /** @@ -84,14 +84,14 @@ protected function getSetUpOperation() protected function getTearDownOperation() { // NONE is default - return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + return PHPUnit\DbUnit\Operation\Factory::NONE(); } /** * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->em = $this->createEntityManager(); @@ -99,7 +99,7 @@ protected function setUp() /** * Run after each test function to prevent pile-up of database connections. */ - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); if (!is_null($this->em)) { @@ -121,7 +121,7 @@ private function createEntityManager() * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() + protected function assertPreConditions(): void { $con = $this->getConnection(); $fixture = dirname(__FILE__) . '/truncateDataTables.xml'; diff --git a/tests/doctrine/bootstrap_pdo_TEMPLATE.php b/tests/doctrine/bootstrap_pdo_TEMPLATE.php index 828d06e39..ab24ff805 100644 --- a/tests/doctrine/bootstrap_pdo_TEMPLATE.php +++ b/tests/doctrine/bootstrap_pdo_TEMPLATE.php @@ -12,7 +12,7 @@ /** * Returns the database connection to your test databse. * Modify as required to return a connection to your test db. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\DefaultConnection */ function getConnectionToTestDB() { @@ -22,7 +22,7 @@ function getConnectionToTestDB() { ///////////////////////SQLITE CONNECTION DETAILS///////////////////////////////////////////// // $sqliteFile = __DIR__ . '/../db.sqlite'; // $pdo = new PDO("sqlite:" . $sqliteFile); - // return new PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection($pdo, 'sqlite'); + // return new PHPUnit\DbUnit\Database\DefaultConnection($pdo, 'sqlite'); ///////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////ORACLE CONNECTION DETAILS///////////////////////////////////////////// @@ -40,12 +40,12 @@ function getConnectionToTestDB() { // $pdo = new PDO('oci:dbname=//localhost:1521/xe', '', ''); // note 'oci:dbname=//' in the connection string // // // now return the required object: - // return new PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection($pdo, 'USERS'); // $pdo object, schema + // return new PHPUnit\DbUnit\Database\DefaultConnection($pdo, 'USERS'); // $pdo object, schema ///////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////MYSQL CONNECTION DETAILS////////////////////////////////////////////// // $pdo = new PDO('mysql:host=localhost;dbname=doctrine;charset=UTF8', 'doctrine', 'doc'); - // return new PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection($pdo); + // return new PHPUnit\DbUnit\Database\DefaultConnection($pdo); ///////////////////////////////////////////////////////////////////////////////////////////// } diff --git a/tests/exampleTests/DoctrineTestExample.php b/tests/exampleTests/DoctrineTestExample.php index efc6de686..2537d7cf6 100644 --- a/tests/exampleTests/DoctrineTestExample.php +++ b/tests/exampleTests/DoctrineTestExample.php @@ -15,14 +15,14 @@ * @author David Meredith * @author James McCarthy */ -class DoctrineTestExample extends PHPUnit_Extensions_Database_TestCase { +class DoctrineTestExample extends PHPUnit\DbUnit\TestCase { private $em; /** * Overridden. */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; echo "Executing Your Test Name. . .\n"; @@ -30,7 +30,7 @@ public static function setUpBeforeClass() { /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { require_once dirname(__FILE__) . '/bootstrap_pdo.php'; @@ -40,7 +40,7 @@ protected function getConnection() { /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { return $this->createFlatXMLDataSet(dirname(__FILE__) . '/truncateDataTables.xml'); @@ -51,14 +51,14 @@ protected function getDataSet() { */ protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements // and also do not allow truncates across tables with FK contstraints e.g. Oracle) - return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(); + return PHPUnit\DbUnit\Operation\Factory::DELETE_ALL(); } /** @@ -66,14 +66,14 @@ protected function getSetUpOperation() { */ protected function getTearDownOperation() { // NONE is default - return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + return PHPUnit\DbUnit\Operation\Factory::NONE(); } /** * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->em = $this->createEntityManager(); } @@ -91,7 +91,7 @@ private function createEntityManager() { * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() { + protected function assertPreConditions(): void { $con = $this->getConnection(); $fixture = dirname(__FILE__) . '/truncateDataTables.xml'; $tables = simplexml_load_file($fixture); diff --git a/tests/exampleTests/DoctrineTestTemplate.php b/tests/exampleTests/DoctrineTestTemplate.php index 34b35f152..a01dbc5ba 100644 --- a/tests/exampleTests/DoctrineTestTemplate.php +++ b/tests/exampleTests/DoctrineTestTemplate.php @@ -14,14 +14,14 @@ * * @author David Meredith */ -class DoctrineTestTemplate extends PHPUnit_Extensions_Database_TestCase { +class DoctrineTestTemplate extends PHPUnit\DbUnit\TestCase { private $em; /** * Overridden. */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; echo "Executing Your Test Name. . .\n"; @@ -29,7 +29,7 @@ public static function setUpBeforeClass() { /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { require_once dirname(__FILE__) . '/bootstrap_pdo.php'; @@ -39,7 +39,7 @@ protected function getConnection() { /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { return $this->createFlatXMLDataSet(dirname(__FILE__) . '/truncateDataTables.xml'); @@ -50,14 +50,14 @@ protected function getDataSet() { */ protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements // and also do not allow truncates across tables with FK contstraints e.g. Oracle) - return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(); + return PHPUnit\DbUnit\Operation\Factory::DELETE_ALL(); } /** @@ -65,14 +65,14 @@ protected function getSetUpOperation() { */ protected function getTearDownOperation() { // NONE is default - return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + return PHPUnit\DbUnit\Operation\Factory::NONE(); } /** * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->em = $this->createEntityManager(); } @@ -90,7 +90,7 @@ private function createEntityManager() { * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() { + protected function assertPreConditions(): void { $con = $this->getConnection(); $fixture = dirname(__FILE__) . '/truncateDataTables.xml'; $tables = simplexml_load_file($fixture); diff --git a/tests/exampleTests/FirstTest.php b/tests/exampleTests/FirstTest.php index 8f9322e53..c5947e5b8 100644 --- a/tests/exampleTests/FirstTest.php +++ b/tests/exampleTests/FirstTest.php @@ -49,7 +49,7 @@ class FirstTest extends PHPUnit_Framework_TestCase { /** * Called once, before any of the tests are executed. */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { print __METHOD__ . "\n"; // define a variable so that example tests below can be conditionally // skipped if the ENV var does not have a specific value. @@ -60,7 +60,7 @@ public static function setUpBeforeClass() { * Sets up the fixture, for example, opens a network connection. * This method is called before each test method is executed. */ - protected function setUp() { + protected function setUp(): void { print __METHOD__ . "\n"; // each time, re-create $this->aArray so that we can execute the @@ -76,12 +76,12 @@ protected function setUp() { * Like setUp(), this is called before each test method to * assert any pre-conditions required by tests. */ - protected function assertPreConditions() { + protected function assertPreConditions(): void { print __METHOD__ . "\n"; //$this->assertTrue(ENV === 'DEV'); } - protected function assertPostConditions() { + protected function assertPostConditions(): void { print __METHOD__ . "\n"; } @@ -89,20 +89,20 @@ protected function assertPostConditions() { * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. */ - protected function tearDown() { + protected function tearDown(): void { print __METHOD__ . "\n"; } /** * executed only once, after all the testing methods */ - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { print __METHOD__ . "\n"; } - protected function onNotSuccessfulTest(Exception $e) { + protected function onNotSuccessfulTest(Throwable $t): void { print __METHOD__ . "\n"; - throw $e; + throw $t; } diff --git a/tests/miscTests/DateTimeConvertTests.php b/tests/miscTests/DateTimeConvertTests.php index 272515ee7..229a46a9e 100644 --- a/tests/miscTests/DateTimeConvertTests.php +++ b/tests/miscTests/DateTimeConvertTests.php @@ -28,7 +28,7 @@ class DateTimeConvertTests extends PHPUnit_Framework_TestCase { /** * Called once, before any of the tests are executed. */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { //print __METHOD__ . "\n"; } @@ -36,18 +36,18 @@ public static function setUpBeforeClass() { * Sets up the fixture, for example, opens a network connection. * This method is called before each test method is executed. */ - protected function setUp() { + protected function setUp(): void { } /** * Like setUp(), this is called before each test method to * assert any pre-conditions required by tests. */ - protected function assertPreConditions() { + protected function assertPreConditions(): void { //print __METHOD__ . "\n"; } - protected function assertPostConditions() { + protected function assertPostConditions(): void { //print __METHOD__ . "\n"; } @@ -55,18 +55,18 @@ protected function assertPostConditions() { * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. */ - protected function tearDown() { + protected function tearDown(): void { //print __METHOD__ . "\n"; } /** * executed only once, after all the testing methods */ - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { //print __METHOD__ . "\n"; } - protected function onNotSuccessfulTest(Exception $e) { + protected function onNotSuccessfulTest(Throwable $t): void { print __METHOD__ . "\n"; throw $e; } diff --git a/tests/miscTests/IPv6FormatTests.php b/tests/miscTests/IPv6FormatTests.php index 81b64a745..4b4d0086e 100644 --- a/tests/miscTests/IPv6FormatTests.php +++ b/tests/miscTests/IPv6FormatTests.php @@ -16,7 +16,7 @@ class IPv6FormatTests extends PHPUnit_Framework_TestCase { /** * Called once, before any of the tests are executed. */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { //print __METHOD__ . "\n"; } @@ -24,18 +24,18 @@ public static function setUpBeforeClass() { * Sets up the fixture, for example, opens a network connection. * This method is called before each test method is executed. */ - protected function setUp() { + protected function setUp(): void { } /** * Like setUp(), this is called before each test method to * assert any pre-conditions required by tests. */ - protected function assertPreConditions() { + protected function assertPreConditions(): void { //print __METHOD__ . "\n"; } - protected function assertPostConditions() { + protected function assertPostConditions(): void { //print __METHOD__ . "\n"; } @@ -43,18 +43,18 @@ protected function assertPostConditions() { * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. */ - protected function tearDown() { + protected function tearDown(): void { //print __METHOD__ . "\n"; } /** * executed only once, after all the testing methods */ - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { //print __METHOD__ . "\n"; } - protected function onNotSuccessfulTest(Exception $e) { + protected function onNotSuccessfulTest(Throwable $t): void { print __METHOD__ . "\n"; throw $e; } diff --git a/tests/miscTests/PI_Extensions_Param_ParsingTest.php b/tests/miscTests/PI_Extensions_Param_ParsingTest.php index 4266529f7..c13befbdd 100644 --- a/tests/miscTests/PI_Extensions_Param_ParsingTest.php +++ b/tests/miscTests/PI_Extensions_Param_ParsingTest.php @@ -24,7 +24,7 @@ class PI_Extensions_Param_ParsingTest extends PHPUnit_Framework_TestCase { /** * Called once, before any of the tests are executed. */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { //print __METHOD__ . "\n"; } @@ -32,18 +32,18 @@ public static function setUpBeforeClass() { * Sets up the fixture, for example, opens a network connection. * This method is called before each test method is executed. */ - protected function setUp() { + protected function setUp(): void { } /** * Like setUp(), this is called before each test method to * assert any pre-conditions required by tests. */ - protected function assertPreConditions() { + protected function assertPreConditions(): void { //print __METHOD__ . "\n"; } - protected function assertPostConditions() { + protected function assertPostConditions(): void { //print __METHOD__ . "\n"; } @@ -51,18 +51,18 @@ protected function assertPostConditions() { * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. */ - protected function tearDown() { + protected function tearDown(): void { //print __METHOD__ . "\n"; } /** * executed only once, after all the testing methods */ - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { //print __METHOD__ . "\n"; } - protected function onNotSuccessfulTest(Exception $e) { + protected function onNotSuccessfulTest(Throwable $t): void { print __METHOD__ . "\n"; throw $e; } diff --git a/tests/phpunit.xml b/tests/phpunit.xml index c065d13cd..c9afcd01c 100644 --- a/tests/phpunit.xml +++ b/tests/phpunit.xml @@ -27,15 +27,12 @@ PHPUnit configuration file for tests. convertNoticesToExceptions="true" convertWarningsToExceptions="true" forceCoversAnnotation="false" - mapTestClassNameToCoveredClassName="false" - printerClass="PHPUnit_TextUI_ResultPrinter" processIsolation="false" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" stopOnRisky="false" - testSuiteLoaderClass="PHPUnit_Runner_StandardTestSuiteLoader" timeoutForSmallTests="1" timeoutForMediumTests="10" timeoutForLargeTests="60" diff --git a/tests/resourcesTests/ManageUnrenewedAPICredentialsTest.php b/tests/resourcesTests/ManageUnrenewedAPICredentialsTest.php index 6065dea04..2704cb4c4 100644 --- a/tests/resourcesTests/ManageUnrenewedAPICredentialsTest.php +++ b/tests/resourcesTests/ManageUnrenewedAPICredentialsTest.php @@ -16,14 +16,14 @@ use org\gocdb\scripts\ManageAPICredentialsActions; use org\gocdb\tests\ManageAPICredentialsTestUtils; -use PHPUnit_Extensions_Database_Operation_Factory; -use PHPUnit_Extensions_Database_TestCase; +use \PHPUnit\DbUnit\Operation\Factory; +use \PHPUnit\DbUnit\TestCase; require_once __DIR__ . '/ManageAPICredentialsTestUtils.php'; require_once __DIR__ . '/../unit/lib/Gocdb_Services/ServiceTestUtil.php'; require_once __DIR__ . '/../../resources/ManageAPICredentials/ManageAPICredentialsActions.php'; -class ManageUnrenewedAPICredentialsTest extends PHPUnit_Extensions_Database_TestCase +class ManageUnrenewedAPICredentialsTest extends \PHPUnit\DbUnit\TestCase { private $entityManager; private $dbOpsFactory; @@ -33,12 +33,12 @@ public function __construct() parent::__construct(); // Use a local instance to avoid Mess Detector's whinging about avoiding // static access. - $this->dbOpsFactory = new PHPUnit_Extensions_Database_Operation_Factory(); + $this->dbOpsFactory = new \PHPUnit\DbUnit\Operation\Factory(); } /** * Overridden. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; @@ -46,7 +46,7 @@ public static function setUpBeforeClass() } /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return \PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { @@ -56,14 +56,14 @@ protected function getConnection() /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return \PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { $dataset = $this->createFlatXMLDataSet(__DIR__ . '/../doctrine/truncateDataTables.xml'); return $dataset; // Use below to return an empty data set if we don't want to truncate and seed - //return new PHPUnit_Extensions_Database_DataSet_DefaultDataSet(); + //return new \PHPUnit\DbUnit\DataSet\DefaultDataSet(); } /** * Overridden. @@ -71,9 +71,9 @@ protected function getDataSet() protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return \PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return \PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return \PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements @@ -92,7 +92,7 @@ protected function getTearDownOperation() * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->entityManager = $this->createEntityManager(); @@ -105,7 +105,7 @@ protected function setUp() /** * Run after each test function to prevent pile-up of database connections. */ - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); if (!is_null($this->entityManager)) { diff --git a/tests/resourcesTests/ManageUnusedAPICredentialsTest.php b/tests/resourcesTests/ManageUnusedAPICredentialsTest.php index ca5dd4a33..9286b94a3 100644 --- a/tests/resourcesTests/ManageUnusedAPICredentialsTest.php +++ b/tests/resourcesTests/ManageUnusedAPICredentialsTest.php @@ -16,14 +16,14 @@ use org\gocdb\scripts\ManageAPICredentialsActions; use org\gocdb\tests\ManageAPICredentialsTestUtils; -use PHPUnit_Extensions_Database_Operation_Factory; -use PHPUnit_Extensions_Database_TestCase; +use \PHPUnit\DbUnit\Operation\Factory; +use \PHPUnit\DbUnit\TestCase; require_once __DIR__ . '/ManageAPICredentialsTestUtils.php'; require_once __DIR__ . '/../unit/lib/Gocdb_Services/ServiceTestUtil.php'; require_once __DIR__ . '/../../resources/ManageAPICredentials/ManageAPICredentialsActions.php'; -class ManageUnusedAPICredentialsTest extends PHPUnit_Extensions_Database_TestCase +class ManageUnusedAPICredentialsTest extends \PHPUnit\DbUnit\TestCase { private $entityManager; private $dbOpsFactory; @@ -33,12 +33,12 @@ public function __construct() parent::__construct(); // Use a local instance to avoid Mess Detector's whinging about avoiding // static access. - $this->dbOpsFactory = new PHPUnit_Extensions_Database_Operation_Factory(); + $this->dbOpsFactory = new \PHPUnit\DbUnit\Operation\Factory(); } /** * Overridden. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; @@ -46,7 +46,7 @@ public static function setUpBeforeClass() } /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return \PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { @@ -56,14 +56,14 @@ protected function getConnection() /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return \PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { $dataset = $this->createFlatXMLDataSet(__DIR__ . '/../doctrine/truncateDataTables.xml'); return $dataset; // Use below to return an empty data set if we don't want to truncate and seed - //return new PHPUnit_Extensions_Database_DataSet_DefaultDataSet(); + //return new \PHPUnit\DbUnit\DataSet\DefaultDataSet(); } /** * Overridden. @@ -71,9 +71,9 @@ protected function getDataSet() protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return \PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return \PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return \PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements @@ -92,7 +92,7 @@ protected function getTearDownOperation() * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->entityManager = $this->createEntityManager(); @@ -105,7 +105,7 @@ protected function setUp() /** * Run after each test function to prevent pile-up of database connections. */ - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); if (!is_null($this->entityManager)) { diff --git a/tests/unit/lib/Gocdb_Services/APIAuthenticationServiceTest.php b/tests/unit/lib/Gocdb_Services/APIAuthenticationServiceTest.php index 3be93251c..f656cd1eb 100644 --- a/tests/unit/lib/Gocdb_Services/APIAuthenticationServiceTest.php +++ b/tests/unit/lib/Gocdb_Services/APIAuthenticationServiceTest.php @@ -19,8 +19,8 @@ use Doctrine\ORM\EntityManager; use org\gocdb\services\APIAuthenticationService; -use PHPUnit_Extensions_Database_Operation_Factory; -use PHPUnit_Extensions_Database_TestCase; +use \PHPUnit\DbUnit\Operation\Factory; +use \PHPUnit\DbUnit\TestCase; use RuntimeException; use org\gocdb\tests\ServiceTestUtil; use TestUtil; @@ -30,7 +30,7 @@ * * @author Ian Neilson (after David Meredith) */ -class APIAuthEnticationServiceTest extends PHPUnit_Extensions_Database_TestCase +class APIAuthEnticationServiceTest extends \PHPUnit\DbUnit\TestCase { private $entityManager; private $dbOpsFactory; @@ -41,13 +41,13 @@ public function __construct() parent::__construct(); // Use a local instance to avoid Mess Detector's whinging about avoiding // static access. - $this->dbOpsFactory = new PHPUnit_Extensions_Database_Operation_Factory(); + $this->dbOpsFactory = new \PHPUnit\DbUnit\Operation\Factory(); $this->serviceTestUtil = new ServiceTestUtil(); } /** * Overridden. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; @@ -56,7 +56,7 @@ public static function setUpBeforeClass() /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return \PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { @@ -67,14 +67,14 @@ protected function getConnection() /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return \PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { $dataset = $this->createFlatXMLDataSet(__DIR__ . '/../../../doctrine/truncateDataTables.xml'); return $dataset; // Use below to return an empty data set if we don't want to truncate and seed - //return new PHPUnit_Extensions_Database_DataSet_DefaultDataSet(); + //return new \PHPUnit\DbUnit\DataSet\DefaultDataSet(); } /** @@ -83,9 +83,9 @@ protected function getDataSet() protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return \PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return \PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return \PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements @@ -106,7 +106,7 @@ protected function getTearDownOperation() * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->entityManager = $this->createEntityManager(); @@ -117,7 +117,7 @@ protected function setUp() /** * Run after each test function to prevent pile-up of database connections. */ - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); if (!is_null($this->entityManager)) { @@ -138,7 +138,7 @@ private function createEntityManager() * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() + protected function assertPreConditions(): void { $con = $this->getConnection(); $fixture = __DIR__ . '/../../../doctrine/truncateDataTables.xml'; diff --git a/tests/unit/lib/Gocdb_Services/RoleActionAuthorisationServiceTest.php b/tests/unit/lib/Gocdb_Services/RoleActionAuthorisationServiceTest.php index 1344892be..648b13ab9 100644 --- a/tests/unit/lib/Gocdb_Services/RoleActionAuthorisationServiceTest.php +++ b/tests/unit/lib/Gocdb_Services/RoleActionAuthorisationServiceTest.php @@ -24,14 +24,14 @@ * * @author djm76 */ -class RoleActionAuthorisationServiceTest extends PHPUnit_Extensions_Database_TestCase +class RoleActionAuthorisationServiceTest extends PHPUnit\DbUnit\TestCase { private $em; /** * Overridden. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; @@ -40,7 +40,7 @@ public static function setUpBeforeClass() /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { @@ -51,13 +51,13 @@ protected function getConnection() /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { return $this->createFlatXMLDataSet(__DIR__ . '/../../../doctrine/truncateDataTables.xml'); // Use below to return an empty data set if we don't want to truncate and seed - //return new PHPUnit_Extensions_Database_DataSet_DefaultDataSet(); + //return new PHPUnit\DbUnit\DataSet\DefaultDataSet(); } /** @@ -66,14 +66,14 @@ protected function getDataSet() protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements // and also do not allow truncates across tables with FK contstraints e.g. Oracle) - return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(); + return PHPUnit\DbUnit\Operation\Factory::DELETE_ALL(); } /** @@ -82,14 +82,14 @@ protected function getSetUpOperation() protected function getTearDownOperation() { // NONE is default - return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + return PHPUnit\DbUnit\Operation\Factory::NONE(); } /** * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->em = $this->createEntityManager(); @@ -97,7 +97,7 @@ protected function setUp() /** * Run after each test function to prevent pile-up of database connections. */ - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); if (!is_null($this->em)) { @@ -118,7 +118,7 @@ private function createEntityManager() * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() + protected function assertPreConditions(): void { $con = $this->getConnection(); $fixture = __DIR__ . '/../../../doctrine/truncateDataTables.xml'; diff --git a/tests/unit/lib/Gocdb_Services/RoleActionMappingServiceTest.php b/tests/unit/lib/Gocdb_Services/RoleActionMappingServiceTest.php index ea7885cf9..df3265e6d 100644 --- a/tests/unit/lib/Gocdb_Services/RoleActionMappingServiceTest.php +++ b/tests/unit/lib/Gocdb_Services/RoleActionMappingServiceTest.php @@ -13,6 +13,8 @@ * limitations under the License. */ +use PHPUnit\DbUnit\TestCase; + require_once __DIR__.'/../../../../lib/Gocdb_Services/RoleActionMappingService.php'; /** @@ -21,48 +23,67 @@ * * @author David Meredith */ -class RoleActionMappingServiceTest extends PHPUnit_Framework_TestCase { +class RoleActionMappingServiceTest extends PHPUnit\DbUnit\TestCase { /** * Called once, before any of the tests are executed. */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { } /** * Sets up the fixture, for example, opens a network connection. * This method is called before each test method is executed. */ - protected function setUp() { + protected function setUp(): void { } /** * Like setUp(), this is called before each test method to * assert any pre-conditions required by tests. */ - protected function assertPreConditions() { + protected function assertPreConditions(): void { } - protected function assertPostConditions() { + protected function assertPostConditions(): void { } /** * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. */ - protected function tearDown() { + protected function tearDown(): void { } /** * executed only once, after all the testing methods */ - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { } - protected function onNotSuccessfulTest(Exception $e) { + protected function onNotSuccessfulTest(Throwable $t): void { print __METHOD__ . "\n"; - throw $e; + throw $t; + } + + /** + * Overridden. Returns the test database connection. + * @return PHPUnit\DbUnit\Database\DefaultConnection + */ + protected function getConnection() + { + require_once dirname(__FILE__) . '/bootstrap_pdo.php'; + return getConnectionToTestDB(); } + /** + * Overridden. Returns the test dataset. + * Defines how the initial state of the database should look before each test is executed. + * @return PHPUnit\DbUnit\DataSet\IDataSet + */ + protected function getDataSet() + { + return $this->createFlatXMLDataSet(dirname(__FILE__) . '/truncateDataTables.xml'); + } public function testValidateRoleActionMappingsAgainstSchema() { print __METHOD__ . "\n"; diff --git a/tests/unit/lib/Gocdb_Services/RoleServiceTest2.php b/tests/unit/lib/Gocdb_Services/RoleServiceTest2.php index 03f817882..91efb0df7 100644 --- a/tests/unit/lib/Gocdb_Services/RoleServiceTest2.php +++ b/tests/unit/lib/Gocdb_Services/RoleServiceTest2.php @@ -31,7 +31,7 @@ * @author Ian Neilson (after David Meredith) */ -class RoleServiceTest2 extends PHPUnit_Extensions_Database_TestCase +class RoleServiceTest2 extends PHPUnit\DbUnit\TestCase { private $entityManager; private $dbOpsFactory; @@ -44,12 +44,12 @@ public function __construct() parent::__construct(); // Use a local instance to avoid Mess Detector's whinging about avoiding // static access. - $this->dbOpsFactory = new PHPUnit_Extensions_Database_Operation_Factory(); + $this->dbOpsFactory = new PHPUnit\DbUnit\Operation\Factory(); } /** * Overridden. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; @@ -58,7 +58,7 @@ public static function setUpBeforeClass() /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { @@ -69,13 +69,13 @@ protected function getConnection() /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { return $this->createFlatXMLDataSet(__DIR__ . '/../../../doctrine/truncateDataTables.xml'); // Use below to return an empty data set if we don't want to truncate and seed - //return new PHPUnit_Extensions_Database_DataSet_DefaultDataSet(); + //return new PHPUnit\DbUnit\DataSet\DefaultDataSet(); } /** @@ -84,9 +84,9 @@ protected function getDataSet() protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements @@ -107,7 +107,7 @@ protected function getTearDownOperation() * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->entityManager = $this->createEntityManager(); @@ -148,7 +148,7 @@ private function createEntityManager() * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() + protected function assertPreConditions(): void { $con = $this->getConnection(); $fixture = __DIR__ . '/../../../doctrine/truncateDataTables.xml'; diff --git a/tests/unit/lib/Gocdb_Services/ScopeServiceTest.php b/tests/unit/lib/Gocdb_Services/ScopeServiceTest.php index d810a9b55..6625001b8 100644 --- a/tests/unit/lib/Gocdb_Services/ScopeServiceTest.php +++ b/tests/unit/lib/Gocdb_Services/ScopeServiceTest.php @@ -25,14 +25,14 @@ * * @author David Meredith */ -class ScopeServiceTest extends PHPUnit_Extensions_Database_TestCase +class ScopeServiceTest extends PHPUnit\DbUnit\TestCase { private $em; /** * Overridden. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; @@ -41,7 +41,7 @@ public static function setUpBeforeClass() /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { @@ -52,13 +52,13 @@ protected function getConnection() /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { return $this->createFlatXMLDataSet(__DIR__ . '/../../../doctrine/truncateDataTables.xml'); // Use below to return an empty data set if we don't want to truncate and seed - //return new PHPUnit_Extensions_Database_DataSet_DefaultDataSet(); + //return new PHPUnit\DbUnit\DataSet\DefaultDataSet(); } /** @@ -67,14 +67,14 @@ protected function getDataSet() protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements // and also do not allow truncates across tables with FK contstraints e.g. Oracle) - return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(); + return PHPUnit\DbUnit\Operation\Factory::DELETE_ALL(); } /** @@ -83,14 +83,14 @@ protected function getSetUpOperation() protected function getTearDownOperation() { // NONE is default - return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + return PHPUnit\DbUnit\Operation\Factory::NONE(); } /** * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->em = $this->createEntityManager(); @@ -98,7 +98,7 @@ protected function setUp() /** * Run after each test function to prevent pile-up of database connections. */ - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); if (!is_null($this->em)) { @@ -119,7 +119,7 @@ private function createEntityManager() * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() + protected function assertPreConditions(): void { $con = $this->getConnection(); $fixture = __DIR__ . '/../../../doctrine/truncateDataTables.xml'; diff --git a/tests/unit/lib/Gocdb_Services/ServiceServiceTest.php b/tests/unit/lib/Gocdb_Services/ServiceServiceTest.php index 4be36998b..910118de6 100644 --- a/tests/unit/lib/Gocdb_Services/ServiceServiceTest.php +++ b/tests/unit/lib/Gocdb_Services/ServiceServiceTest.php @@ -15,8 +15,8 @@ use org\gocdb\services\RoleActionMappingService; use org\gocdb\services\Scope as ScopeService; use org\gocdb\services\ServiceService; -use PHPUnit_Extensions_Database_Operation_Factory; -use PHPUnit_Extensions_Database_TestCase; +use \PHPUnit\DbUnit\Operation\Factory; +use \PHPUnit\DbUnit\TestCase; use RuntimeException; use TestUtil; @@ -25,14 +25,14 @@ * * @author Ian Neilson */ -class ServiceServiceTest extends PHPUnit_Extensions_Database_TestCase +class ServiceServiceTest extends \PHPUnit\DbUnit\TestCase { private $em; /** * Overridden. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; @@ -41,7 +41,7 @@ public static function setUpBeforeClass() /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return \PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { @@ -52,7 +52,7 @@ protected function getConnection() /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return \PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { @@ -65,14 +65,14 @@ protected function getDataSet() protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return \PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return \PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return \PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements // and also do not allow truncates across tables with FK contstraints e.g. Oracle) - return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(); + return \PHPUnit\DbUnit\Operation\Factory::DELETE_ALL(); } /** @@ -81,14 +81,14 @@ protected function getSetUpOperation() protected function getTearDownOperation() { // NONE is default - return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + return \PHPUnit\DbUnit\Operation\Factory::NONE(); } /** * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->em = $this->createEntityManager(); @@ -101,7 +101,7 @@ protected function setUp() /** * Run after each test function to prevent pile-up of database connections. */ - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); if (!is_null($this->em)) { @@ -124,7 +124,7 @@ private function createEntityManager() * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() + protected function assertPreConditions(): void { /** * Checks that all tables are empty before we start a test. diff --git a/tests/unit/lib/Gocdb_Services/ServiceTypeServiceTest.php b/tests/unit/lib/Gocdb_Services/ServiceTypeServiceTest.php index 8f7c9fa4f..760ff80af 100644 --- a/tests/unit/lib/Gocdb_Services/ServiceTypeServiceTest.php +++ b/tests/unit/lib/Gocdb_Services/ServiceTypeServiceTest.php @@ -2,9 +2,6 @@ namespace org\gocdb\tests; -//require_once 'PHPUnit/Extensions/Database/TestCase.php'; -//require_once 'PHPUnit/Extensions/Database/DataSet/DefaultDataSet.php'; - require_once dirname(__FILE__) . '/../../../doctrine/TestUtil.php'; require_once dirname(__FILE__) . '/../../../doctrine/bootstrap.php'; require_once dirname(__FILE__) . '/../../../../lib/Gocdb_Services/ServiceType.php'; @@ -13,8 +10,8 @@ //require_once dirname(__FILE__) . '/../../../../lib/Doctrine/entities/Service.php'; use Doctrine\ORM\EntityManager; -use PHPUnit_Extensions_Database_Operation_Factory; -use PHPUnit_Extensions_Database_TestCase; +use \PHPUnit\DbUnit\Operation\Factory; +use \PHPUnit\DbUnit\TestCase; use RuntimeException; use org\gocdb\services\ServiceType as ServiceTypeService; use TestUtil; @@ -24,14 +21,14 @@ * * @author Ian Neilson */ -class ServiceTypeServiceTest extends PHPUnit_Extensions_Database_TestCase +class ServiceTypeServiceTest extends \PHPUnit\DbUnit\TestCase { private $em; /** * Overridden. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; @@ -40,7 +37,7 @@ public static function setUpBeforeClass() /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return \PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { @@ -51,7 +48,7 @@ protected function getConnection() /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return \PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { @@ -64,14 +61,14 @@ protected function getDataSet() protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return \PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return \PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return \PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements // and also do not allow truncates across tables with FK contstraints e.g. Oracle) - return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(); + return \PHPUnit\DbUnit\Operation\Factory::DELETE_ALL(); } /** @@ -80,14 +77,14 @@ protected function getSetUpOperation() protected function getTearDownOperation() { // NONE is default - return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + return \PHPUnit\DbUnit\Operation\Factory::NONE(); } /** * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->em = $this->createEntityManager(); @@ -113,7 +110,7 @@ private function createEntityManager() * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() + protected function assertPreConditions(): void { /** * Checks that all tables are empty before we start a test. diff --git a/tests/unit/lib/Gocdb_Services/SiteServiceTest.php b/tests/unit/lib/Gocdb_Services/SiteServiceTest.php index f71b445b7..d828e3cfe 100644 --- a/tests/unit/lib/Gocdb_Services/SiteServiceTest.php +++ b/tests/unit/lib/Gocdb_Services/SiteServiceTest.php @@ -25,8 +25,8 @@ use Doctrine\ORM\EntityManager; use org\gocdb\tests\ServiceTestUtil; -use PHPUnit_Extensions_Database_Operation_Factory; -use PHPUnit_Extensions_Database_TestCase; +use \PHPUnit\DbUnit\Operation\Factory; +use \PHPUnit\DbUnit\TestCase; use RuntimeException; use TestUtil; @@ -35,7 +35,7 @@ * * @author Ian Neilson (after David Meredith) */ -class SiteServiceTest extends PHPUnit_Extensions_Database_TestCase +class SiteServiceTest extends \PHPUnit\DbUnit\TestCase { private $entityManager; private $dbOpsFactory; @@ -48,13 +48,13 @@ public function __construct() parent::__construct(); // Use a local instance to avoid Mess Detector's whinging about avoiding // static access. - $this->dbOpsFactory = new PHPUnit_Extensions_Database_Operation_Factory(); + $this->dbOpsFactory = new \PHPUnit\DbUnit\Operation\Factory(); $this->serviceTestUtil = new ServiceTestUtil(); } /** * Overridden. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; @@ -63,7 +63,7 @@ public static function setUpBeforeClass() /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return \PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { @@ -74,14 +74,14 @@ protected function getConnection() /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return \PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { $dataset = $this->createFlatXMLDataSet(__DIR__ . '/../../../doctrine/truncateDataTables.xml'); return $dataset; // Use below to return an empty data set if we don't want to truncate and seed - //return new PHPUnit_Extensions_Database_DataSet_DefaultDataSet(); + //return new \PHPUnit\DbUnit\DataSet\DefaultDataSet(); } /** @@ -90,9 +90,9 @@ protected function getDataSet() protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return \PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return \PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return \PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements @@ -113,7 +113,7 @@ protected function getTearDownOperation() * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->entityManager = $this->createEntityManager(); @@ -125,7 +125,7 @@ protected function setUp() /** * Run after each test function to prevent pile-up of database connections. */ - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); if (!is_null($this->entityManager)) { @@ -146,7 +146,7 @@ private function createEntityManager() * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() + protected function assertPreConditions(): void { $con = $this->getConnection(); $fixture = __DIR__ . '/../../../doctrine/truncateDataTables.xml'; diff --git a/tests/unit/lib/Gocdb_Services/UserServiceTest.php b/tests/unit/lib/Gocdb_Services/UserServiceTest.php index f97bddfcc..a4697c932 100644 --- a/tests/unit/lib/Gocdb_Services/UserServiceTest.php +++ b/tests/unit/lib/Gocdb_Services/UserServiceTest.php @@ -27,7 +27,7 @@ * * @author Ian Neilson (after David Meredith) */ -class UserServiceTest extends PHPUnit_Extensions_Database_TestCase +class UserServiceTest extends PHPUnit\DbUnit\TestCase { private $entityManager; private $dbOpsFactory; @@ -37,12 +37,12 @@ function __construct() parent::__construct(); // Use a local instance to avoid Mess Detector's whinging about avoiding // static access. - $this->dbOpsFactory = new PHPUnit_Extensions_Database_Operation_Factory(); + $this->dbOpsFactory = new PHPUnit\DbUnit\Operation\Factory(); } /** * Overridden. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; @@ -51,7 +51,7 @@ public static function setUpBeforeClass() /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { @@ -62,13 +62,13 @@ protected function getConnection() /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { return $this->createFlatXMLDataSet(__DIR__ . '/../../../doctrine/truncateDataTables.xml'); // Use below to return an empty data set if we don't want to truncate and seed - //return new PHPUnit_Extensions_Database_DataSet_DefaultDataSet(); + //return new PHPUnit\DbUnit\DataSet\DefaultDataSet(); } /** @@ -77,9 +77,9 @@ protected function getDataSet() protected function getSetUpOperation() { // CLEAN_INSERT is default - //return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(); - //return PHPUnit_Extensions_Database_Operation_Factory::UPDATE(); - //return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + //return PHPUnit\DbUnit\Operation\Factory::CLEAN_INSERT(); + //return PHPUnit\DbUnit\Operation\Factory::UPDATE(); + //return PHPUnit\DbUnit\Operation\Factory::NONE(); // // Issue a DELETE from
which is more portable than a // TRUNCATE table
(some DBs require high privileges for truncate statements @@ -100,7 +100,7 @@ protected function getTearDownOperation() * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->entityManager = $this->createEntityManager(); @@ -108,7 +108,7 @@ protected function setUp() /** * Run after each test function to prevent pile-up of database connections. */ - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); if (!is_null($this->entityManager)) { @@ -129,7 +129,7 @@ private function createEntityManager() * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() + protected function assertPreConditions(): void { $con = $this->getConnection(); $fixture = __DIR__ . '/../../../doctrine/truncateDataTables.xml'; diff --git a/tests/writeAPI/abstractClass.php b/tests/writeAPI/abstractClass.php index d8aef7003..4b10e504d 100644 --- a/tests/writeAPI/abstractClass.php +++ b/tests/writeAPI/abstractClass.php @@ -24,14 +24,14 @@ * Abstract class for testing the Write API. * */ -abstract class AbstractWriteAPITestClass extends PHPUnit_Extensions_Database_TestCase +abstract class AbstractWriteAPITestClass extends PHPUnit\DbUnit\TestCase { protected $em; protected $validAuthIdent = 'validIdentifierString'; /** * Overridden. Returns the test database connection. - * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection + * @return PHPUnit\DbUnit\Database\DefaultConnection */ protected function getConnection() { @@ -42,7 +42,7 @@ protected function getConnection() /** * Overridden. Returns the test dataset. * Defines how the initial state of the database should look before each test is executed. - * @return PHPUnit_Extensions_Database_DataSet_IDataSet + * @return PHPUnit\DbUnit\DataSet\IDataSet */ protected function getDataSet() { @@ -59,7 +59,7 @@ protected function getSetUpOperation() # Issue a DELETE from
which is more portable than a # TRUNCATE table
(some DBs require high privileges for truncate statements # and also do not allow truncates across tables with FK contstraints e.g. Oracle) - return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(); + return PHPUnit\DbUnit\Operation\Factory::DELETE_ALL(); } /** @@ -68,14 +68,14 @@ protected function getSetUpOperation() protected function getTearDownOperation() { # NONE is default - return PHPUnit_Extensions_Database_Operation_Factory::NONE(); + return PHPUnit\DbUnit\Operation\Factory::NONE(); } /** * Sets up the fixture, e.g create a new entityManager for each test run * This method is called before each test method is executed. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->em = $this->createEntityManager(); @@ -83,7 +83,7 @@ protected function setUp() /** * Run after each test function to prevent pile-up of database connections. */ - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); if (!is_null($this->em)) { @@ -104,7 +104,7 @@ private function createEntityManager() * Called after setUp() and before each test. Used for common assertions * across all tests. */ - protected function assertPreConditions() + protected function assertPreConditions(): void { $con = $this->getConnection(); $fixture = __DIR__ . '/../doctrine/truncateDataTables.xml'; diff --git a/tests/writeAPI/endpointMethods.php b/tests/writeAPI/endpointMethods.php index 3c97e1e8e..a94d4729f 100644 --- a/tests/writeAPI/endpointMethods.php +++ b/tests/writeAPI/endpointMethods.php @@ -37,7 +37,7 @@ class WriteAPIendpointMethodsTests extends extensionPropertyAbstract { /** * Overridden. */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; echo "Executing WriteAPIendpointMethodsTests. . .\n"; diff --git a/tests/writeAPI/serviceMethods.php b/tests/writeAPI/serviceMethods.php index 1186c4dfc..5d8bcd4d4 100644 --- a/tests/writeAPI/serviceMethods.php +++ b/tests/writeAPI/serviceMethods.php @@ -46,7 +46,7 @@ class WriteAPIserviceMethodsTests extends extensionPropertyAbstract { /** * Overridden. */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; echo "Executing WriteAPIserviceMethodsTests. . .\n"; diff --git a/tests/writeAPI/siteMethods.php b/tests/writeAPI/siteMethods.php index e1f410d2c..f115a1589 100644 --- a/tests/writeAPI/siteMethods.php +++ b/tests/writeAPI/siteMethods.php @@ -22,7 +22,7 @@ class WriteAPIsiteMethodsTests extends extensionPropertyAbstract { /** * Overridden. */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); echo "\n\n-------------------------------------------------\n"; echo "Executing WriteAPIsiteMethodsTests. . .\n";