Skip to content

Commit

Permalink
Migrate to PHPUnit 10
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Dec 23, 2023
1 parent bd4400c commit 722e218
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/vendor
/composer.lock
/.phpunit.result.cache
/.phpunit.cache
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"ext-pdo": "*",
"ext-pdo_sqlite": "*",
"doctrine/annotations": "^1.11",
"phpunit/phpunit": "^9.0",
"phpunit/phpunit": "^10.5",
"php-coveralls/php-coveralls": "^2.4",
"vimeo/psalm": "^5.15.0"
},
Expand Down
7 changes: 4 additions & 3 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" bootstrap="phpunit-bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" bootstrap="phpunit-bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" cacheDirectory=".phpunit.cache">
<testsuites>
<testsuite name="PhoneNumber Doctrine tests">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage processUncoveredFiles="true">
<coverage/>
<source>
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>
</source>
</phpunit>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Doctrine\ORM\EntityManager;
use PHPUnit\Framework\TestCase;

abstract class AbstractFunctionalTest extends TestCase
abstract class AbstractFunctionalTestCase extends TestCase
{
final protected static function createConnection(): Connection
{
Expand Down
8 changes: 4 additions & 4 deletions tests/Types/PhoneNumberTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function testConvertToDatabaseValue(?PhoneNumber $value, ?string $expecte
self::assertSame($expectedValue, $actualValue);
}

public function providerConvertToDatabaseValue(): array
public static function providerConvertToDatabaseValue(): array
{
return [
[null, null],
Expand All @@ -51,7 +51,7 @@ public function testConvertToDatabaseValueWithInvalidValue($value): void
$type->convertToDatabaseValue($value, new SqlitePlatform());
}

public function providerConvertToDatabaseValueWithInvalidValue(): array
public static function providerConvertToDatabaseValueWithInvalidValue(): array
{
return [
[123],
Expand All @@ -78,7 +78,7 @@ public function testConvertToPHPValue(?string $value): void
}
}

public function providerConvertToPHPValue(): array
public static function providerConvertToPHPValue(): array
{
return [
[null],
Expand All @@ -98,7 +98,7 @@ public function testConvertToPHPValueWithInvalidValue($value, string $expectedEx
$type->convertToPHPValue($value, new SqlitePlatform());
}

public function providerConvertToPHPValueWithInvalidValue(): array
public static function providerConvertToPHPValueWithInvalidValue(): array
{
return [
[123, ConversionException::class],
Expand Down
2 changes: 1 addition & 1 deletion tests/TypesFunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use Doctrine\DBAL\Connection;
use Doctrine\ORM\Tools\SchemaTool;

class TypesFunctionalTest extends AbstractFunctionalTest
class TypesFunctionalTest extends AbstractFunctionalTestCase
{
public function testCreateSchema(): Connection
{
Expand Down

0 comments on commit 722e218

Please sign in to comment.