Skip to content

Commit

Permalink
Remove base test case class (#10910)
Browse files Browse the repository at this point in the history
We are using PHPUnit 10, so none of the polyfills in that class are
needed now.
  • Loading branch information
greg0ire authored Aug 15, 2023
1 parent 394f6fe commit 2c39b3f
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 74 deletions.
59 changes: 0 additions & 59 deletions tests/Doctrine/Tests/DoctrineTestCase.php

This file was deleted.

4 changes: 2 additions & 2 deletions tests/Doctrine/Tests/ORM/Cache/CacheConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
use Doctrine\ORM\Cache\QueryCacheValidator;
use Doctrine\ORM\Cache\TimestampQueryCacheValidator;
use Doctrine\ORM\Cache\TimestampRegion;
use Doctrine\Tests\DoctrineTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;

#[CoversClass(CacheConfiguration::class)]
#[Group('DDC-2183')]
class CacheConfigTest extends DoctrineTestCase
class CacheConfigTest extends TestCase
{
private CacheConfiguration $config;

Expand Down
4 changes: 2 additions & 2 deletions tests/Doctrine/Tests/ORM/Cache/CacheKeyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
use Doctrine\ORM\Cache\CacheKey;
use Doctrine\ORM\Cache\CollectionCacheKey;
use Doctrine\ORM\Cache\EntityCacheKey;
use Doctrine\Tests\DoctrineTestCase;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;

#[Group('DDC-2183')]
class CacheKeyTest extends DoctrineTestCase
class CacheKeyTest extends TestCase
{
public function testEntityCacheKeyIdentifierCollision(): void
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Doctrine/Tests/ORM/Cache/CacheLoggerChainTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
use Doctrine\ORM\Cache\Logging\CacheLogger;
use Doctrine\ORM\Cache\Logging\CacheLoggerChain;
use Doctrine\ORM\Cache\QueryCacheKey;
use Doctrine\Tests\DoctrineTestCase;
use Doctrine\Tests\Models\Cache\State;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;

#[Group('DDC-2183')]
class CacheLoggerChainTest extends DoctrineTestCase
class CacheLoggerChainTest extends TestCase
{
private CacheLoggerChain $logger;
private CacheLogger&MockObject $mock;
Expand Down
4 changes: 2 additions & 2 deletions tests/Doctrine/Tests/ORM/Cache/StatisticsCacheLoggerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
use Doctrine\ORM\Cache\EntityCacheKey;
use Doctrine\ORM\Cache\Logging\StatisticsCacheLogger;
use Doctrine\ORM\Cache\QueryCacheKey;
use Doctrine\Tests\DoctrineTestCase;
use Doctrine\Tests\Models\Cache\State;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;

#[Group('DDC-2183')]
class StatisticsCacheLoggerTest extends DoctrineTestCase
class StatisticsCacheLoggerTest extends TestCase
{
private StatisticsCacheLogger $logger;

Expand Down
4 changes: 2 additions & 2 deletions tests/Doctrine/Tests/ORM/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
use Doctrine\ORM\Mapping\QuoteStrategy;
use Doctrine\ORM\Proxy\ProxyFactory;
use Doctrine\Persistence\Mapping\Driver\MappingDriver;
use Doctrine\Tests\DoctrineTestCase;
use Doctrine\Tests\Models\DDC753\DDC753CustomRepository;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use Psr\Cache\CacheItemPoolInterface;

/**
* Tests for the Configuration object
*/
class ConfigurationTest extends DoctrineTestCase
class ConfigurationTest extends TestCase
{
use VerifyDeprecations;

Expand Down
4 changes: 2 additions & 2 deletions tests/Doctrine/Tests/ORM/Functional/Ticket/DDC4024Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
namespace Doctrine\Tests\ORM\Functional\Ticket;

use Doctrine\ORM\NonUniqueResultException;
use Doctrine\Tests\DoctrineTestCase;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;

#[Group('DDC4024')]
final class DDC4024Test extends DoctrineTestCase
final class DDC4024Test extends TestCase
{
public function testConstructorShouldUseProvidedMessage(): void
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Doctrine/Tests/ORM/Tools/Console/ConsoleRunnerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
use DBALConsole\Command\ReservedWordsCommand;
use Doctrine\ORM\Tools\Console\ConsoleRunner;
use Doctrine\ORM\Tools\Console\EntityManagerProvider;
use Doctrine\Tests\DoctrineTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Command\Command;

use function class_exists;

#[CoversClass(ConsoleRunner::class)]
#[Group('DDC-3186')]
final class ConsoleRunnerTest extends DoctrineTestCase
final class ConsoleRunnerTest extends TestCase
{
public function testCreateApplicationShouldReturnAnApplicationWithTheCorrectCommands(): void
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Doctrine/Tests/OrmTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use Doctrine\ORM\Configuration;
use Doctrine\ORM\Mapping\Driver\AttributeDriver;
use Doctrine\Tests\Mocks\EntityManagerMock;
use PHPUnit\Framework\TestCase;
use Psr\Cache\CacheItemPoolInterface;
use Symfony\Component\Cache\Adapter\ArrayAdapter;

Expand All @@ -27,7 +28,7 @@
/**
* Base testcase class for all ORM testcases.
*/
abstract class OrmTestCase extends DoctrineTestCase
abstract class OrmTestCase extends TestCase
{
/**
* The metadata cache that is shared between all ORM tests (except functional tests).
Expand Down

0 comments on commit 2c39b3f

Please sign in to comment.