Skip to content

Commit 36ab999

Browse files
authored
Merge pull request #760 from driehle/upgrade-phpunit
Upgraded from PHPUnit 9 to 10
2 parents 0894ea1 + e3a7b2d commit 36ab999

File tree

9 files changed

+24
-31
lines changed

9 files changed

+24
-31
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/.phpcs.cache
2-
/.phpunit.result.cache
2+
/.phpunit.cache/
33
/ci/20*/
44
/config/application.config.php
55
/coverage.xml

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"ocramius/proxy-manager": "^2.2.0",
4343
"phpstan/phpstan": "^1.4.6",
4444
"phpstan/phpstan-phpunit": "^1.0.0",
45-
"phpunit/phpunit": "^9.5.13",
45+
"phpunit/phpunit": "^10.5.40",
4646
"squizlabs/php_codesniffer": "^3.6.2"
4747
},
4848
"conflict": {
File renamed without changes.

phpunit.xml.dist

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,17 @@
1-
<?xml version="1.0"?>
2-
<phpunit
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
5-
bootstrap="./vendor/autoload.php"
6-
colors="true"
7-
convertErrorsToExceptions="true"
8-
convertNoticesToExceptions="true"
9-
convertWarningsToExceptions="true"
10-
convertDeprecationsToExceptions="true"
11-
verbose="true"
12-
stopOnFailure="false"
13-
processIsolation="false"
14-
backupGlobals="false"
15-
>
16-
<coverage includeUncoveredFiles="true">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
4+
bootstrap="vendor/autoload.php"
5+
colors="true"
6+
cacheDirectory=".phpunit.cache">
7+
<testsuites>
8+
<testsuite name="DoctrineORMModule Test Suite">
9+
<directory>./tests</directory>
10+
</testsuite>
11+
</testsuites>
12+
<source>
1713
<include>
1814
<directory suffix=".php">./src</directory>
1915
</include>
20-
</coverage>
21-
<testsuite name="DoctrineORMModule test">
22-
<directory>./tests</directory>
23-
</testsuite>
16+
</source>
2417
</phpunit>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @ORM\Entity
1111
* @ORM\Table(name="doctrine_orm_module_test")
1212
*/
13-
class Test
13+
class TestEntity
1414
{
1515
/**
1616
* @ORM\Id

tests/Assets/Fixture/TestFixture.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Doctrine\Persistence\ObjectManager;
99
use DoctrineORMModuleTest\Assets\Entity\Category;
1010
use DoctrineORMModuleTest\Assets\Entity\Country;
11-
use DoctrineORMModuleTest\Assets\Entity\Test as TestEntity;
11+
use DoctrineORMModuleTest\Assets\Entity\TestEntity;
1212

1313
/**
1414
* Fixture that loads a constant amount of \DoctrineORMModuleTest\Assets\Entity\Test objects into the manager

tests/Collector/MappingCollectorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ public function testCanHide(): void
9494
}
9595

9696
/**
97-
* @covers \DoctrineORMModule\Collector\MappingCollector::serialize
98-
* @covers \DoctrineORMModule\Collector\MappingCollector::unserialize
97+
* @covers \DoctrineORMModule\Collector\MappingCollector::__serialize
98+
* @covers \DoctrineORMModule\Collector\MappingCollector::__unserialize
9999
* @covers \DoctrineORMModule\Collector\MappingCollector::collect
100100
*/
101101
public function testSerializeUnserializeAndCollectWithNoMetadataFactory(): void

tests/Paginator/AdapterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Doctrine\ORM\QueryBuilder;
1111
use Doctrine\ORM\Tools\Pagination\Paginator as DoctrinePaginator;
1212
use DoctrineORMModule\Paginator\Adapter\DoctrinePaginator as PaginatorAdapter;
13-
use DoctrineORMModuleTest\Assets\Entity\Test;
13+
use DoctrineORMModuleTest\Assets\Entity\TestEntity;
1414
use DoctrineORMModuleTest\Assets\Fixture\TestFixture;
1515
use DoctrineORMModuleTest\Framework\TestCase;
1616

@@ -46,7 +46,7 @@ public function setUp(): void
4646
->getEntityManager()
4747
->createQueryBuilder()
4848
->select('t')
49-
->from(Test::class, 't')
49+
->from(TestEntity::class, 't')
5050
->orderBy('t.id', 'ASC');
5151

5252
$this->paginator = new DoctrinePaginator($this->queryBuilder);

tests/testing.config.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
use Doctrine\DBAL\Driver\PDO\SQLite\Driver;
5+
use Doctrine\DBAL\Driver\PDO\SQLite\Driver as SQLiteDriver;
66
use Doctrine\ORM\Mapping\Driver\AnnotationDriver;
77
use DoctrineModule\Service\EventManagerFactory;
88
use DoctrineORMModule\Service\ConfigurationFactory;
@@ -55,13 +55,13 @@
5555
'orm_default' => [
5656
'configuration' => 'orm_default',
5757
'eventmanager' => 'orm_default',
58-
'driverClass' => Driver::class,
58+
'driverClass' => SQLiteDriver::class,
5959
'params' => ['memory' => true],
6060
],
6161
'orm_other' => [
6262
'configuration' => 'orm_other',
6363
'eventmanager' => 'orm_other',
64-
'driverClass' => Driver::class,
64+
'driverClass' => SQLiteDriver::class,
6565
'params' => ['memory' => true],
6666
],
6767
],

0 commit comments

Comments
 (0)