Skip to content

Commit

Permalink
Merge pull request #845 from driehle/upgrade-phpunit
Browse files Browse the repository at this point in the history
Upgraded from PHPUnit 9 to 10
  • Loading branch information
driehle authored Dec 24, 2024
2 parents 47231be + 1c008a5 commit e2a43ac
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/.phpcs.cache
/.phpunit.result.cache
/coverage.xml
/composer.lock
/phpcs.xml
/phpunit.xml
/.phpunit.cache/
/output/
/vendor/
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"phpdocumentor/guides-cli": "^1.5.0",
"phpstan/phpstan": "^1.9.2",
"phpstan/phpstan-phpunit": "^1.3.0",
"phpunit/phpunit": "^9.5.27",
"phpunit/phpunit": "^10.5.40",
"predis/predis": "^1.1.10"
},
"conflict": {
Expand Down
16 changes: 8 additions & 8 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
convertDeprecationsToExceptions="true"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true">
<coverage processUncoveredFiles="false">
<include>
<directory suffix=".php">./src</directory>
</include>
</coverage>
colors="true"
cacheDirectory=".phpunit.cache">
<testsuites>
<testsuite name="DoctrineModule Test Suite">
<directory>./tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>
4 changes: 2 additions & 2 deletions tests/Service/CacheFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/
class CacheFactoryTest extends BaseTestCase
{
/** @covers \DoctrineModule\Service\CacheFactory::createService */
/** @covers \DoctrineModule\Service\CacheFactory::__invoke */
public function testWillSetNamespace(): void
{
if (! InstalledVersions::satisfies(new VersionParser(), 'doctrine/cache', '^1.0.0')) {
Expand Down Expand Up @@ -55,7 +55,7 @@ public function testWillSetNamespace(): void
}

/**
* @covers \DoctrineModule\Service\CacheFactory::createService
* @covers \DoctrineModule\Service\CacheFactory::__invoke
* @group 547
*/
public function testCreateLaminasCache(): void
Expand Down
6 changes: 3 additions & 3 deletions tests/ServiceFactory/ModuleDefinedServicesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function testModuleInvalidService(string $serviceName): void
}

/** @return mixed[][] */
public function getServicesThatShouldBeDefined(): array
public static function getServicesThatShouldBeDefined(): array
{
$legacyCacheShouldExist = InstalledVersions::satisfies(new VersionParser(), 'doctrine/cache', '^1.0');

Expand Down Expand Up @@ -92,7 +92,7 @@ public function getServicesThatShouldBeDefined(): array
}

/** @return string[][] */
public function getServicesThatCanBeFetched(): array
public static function getServicesThatCanBeFetched(): array
{
if (InstalledVersions::satisfies(new VersionParser(), 'doctrine/cache', '^1.0')) {
return [
Expand All @@ -110,7 +110,7 @@ public function getServicesThatCanBeFetched(): array
}

/** @return string[][] */
public function getServicesThatCannotBeFetched(): array
public static function getServicesThatCannotBeFetched(): array
{
return [
['foo'],
Expand Down
4 changes: 1 addition & 3 deletions tests/Validator/Service/NoObjectExistsFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* Generated by PHPUnit_SkeletonGenerator on 2017-09-04 at 11:12:27.
*
* @coversDefaultClass NoObjectExistsFactory
* @coversDefaultClass \DoctrineModule\Validator\Service\NoObjectExistsFactory
* @group validator
*/
class NoObjectExistsFactoryTest extends TestCase
Expand All @@ -41,7 +41,6 @@ public function testCallable(): void

/**
* @covers ::__invoke
* @covers ::container
* @covers ::getRepository
* @covers ::getObjectManager
* @covers ::getFields
Expand Down Expand Up @@ -78,7 +77,6 @@ public function testInvoke(): void

/**
* @covers ::__invoke
* @covers ::container
* @covers ::getRepository
* @covers ::getObjectManager
* @covers ::getFields
Expand Down
2 changes: 1 addition & 1 deletion tests/Validator/Service/ObjectExistsFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* Generated by PHPUnit_SkeletonGenerator on 2017-09-04 at 11:55:36.
*
* @coversDefaultClass ObjectExistsFactory
* @coversDefaultClass \DoctrineModule\Validator\Service\ObjectExistsFactory
* @group validator
*/
class ObjectExistsFactoryTest extends TestCase
Expand Down
2 changes: 1 addition & 1 deletion tests/Validator/Service/UniqueObjectFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* Generated by PHPUnit_SkeletonGenerator on 2017-09-04 at 11:57:37.
*
* @coversDefaultClass UniqueObjectFactory
* @coversDefaultClass \DoctrineModule\Validator\Service\UniqueObjectFactory
* @group validator
*/
class UniqueObjectFactoryTest extends TestCase
Expand Down

0 comments on commit e2a43ac

Please sign in to comment.