From 5df6eec070b521303ff971eaea59c9c92e32d82b Mon Sep 17 00:00:00 2001 From: Fabri Di Napoli Date: Thu, 9 Mar 2017 00:35:08 +0100 Subject: [PATCH] Adapt Unit Tests code to PHPUnit 6 --- Behavioral/ChainOfResponsibilities/Tests/ChainTest.php | 3 ++- Behavioral/Command/Tests/CommandTest.php | 3 ++- Behavioral/Command/Tests/UndoableCommandTest.php | 3 ++- Behavioral/Iterator/Tests/IteratorTest.php | 3 ++- Behavioral/Mediator/Tests/MediatorTest.php | 3 ++- Behavioral/Memento/Tests/MementoTest.php | 3 ++- Behavioral/NullObject/Tests/LoggerTest.php | 3 ++- Behavioral/Observer/Tests/ObserverTest.php | 3 ++- Behavioral/Specification/Tests/SpecificationTest.php | 3 ++- Behavioral/State/Tests/StateTest.php | 3 ++- Behavioral/Strategy/Tests/StrategyTest.php | 3 ++- Behavioral/TemplateMethod/Tests/JourneyTest.php | 3 ++- Behavioral/Visitor/Tests/VisitorTest.php | 3 ++- Creational/AbstractFactory/Tests/AbstractFactoryTest.php | 3 ++- Creational/Builder/Tests/DirectorTest.php | 3 ++- Creational/FactoryMethod/Tests/FactoryMethodTest.php | 3 ++- Creational/Multiton/Tests/MultitonTest.php | 3 ++- Creational/Pool/Tests/PoolTest.php | 3 ++- Creational/Prototype/Tests/PrototypeTest.php | 3 ++- Creational/SimpleFactory/Tests/SimpleFactoryTest.php | 3 ++- Creational/Singleton/Tests/SingletonTest.php | 3 ++- Creational/StaticFactory/Tests/StaticFactoryTest.php | 3 ++- More/Delegation/Tests/DelegationTest.php | 3 ++- More/EAV/Tests/EAVTest.php | 3 ++- More/Repository/Tests/RepositoryTest.php | 3 ++- More/ServiceLocator/Tests/ServiceLocatorTest.php | 2 +- Structural/Adapter/Tests/AdapterTest.php | 3 ++- Structural/Bridge/Tests/BridgeTest.php | 3 ++- Structural/Composite/Tests/CompositeTest.php | 3 ++- Structural/DataMapper/Tests/DataMapperTest.php | 3 ++- Structural/Decorator/Tests/DecoratorTest.php | 3 ++- .../DependencyInjection/Tests/DependencyInjectionTest.php | 3 ++- Structural/Facade/Tests/FacadeTest.php | 3 ++- Structural/FluentInterface/Tests/FluentInterfaceTest.php | 3 ++- Structural/Flyweight/Tests/FlyweightTest.php | 3 ++- Structural/Proxy/Tests/ProxyTest.php | 3 ++- Structural/Registry/Tests/RegistryTest.php | 3 ++- 37 files changed, 73 insertions(+), 37 deletions(-) diff --git a/Behavioral/ChainOfResponsibilities/Tests/ChainTest.php b/Behavioral/ChainOfResponsibilities/Tests/ChainTest.php index 296a0c35a..c61f1fbba 100644 --- a/Behavioral/ChainOfResponsibilities/Tests/ChainTest.php +++ b/Behavioral/ChainOfResponsibilities/Tests/ChainTest.php @@ -5,8 +5,9 @@ use DesignPatterns\Behavioral\ChainOfResponsibilities\Handler; use DesignPatterns\Behavioral\ChainOfResponsibilities\Responsible\HttpInMemoryCacheHandler; use DesignPatterns\Behavioral\ChainOfResponsibilities\Responsible\SlowDatabaseHandler; +use PHPUnit\Framework\TestCase; -class ChainTest extends \PHPUnit_Framework_TestCase +class ChainTest extends TestCase { /** * @var Handler diff --git a/Behavioral/Command/Tests/CommandTest.php b/Behavioral/Command/Tests/CommandTest.php index cd3ea03cd..fa2e835f0 100644 --- a/Behavioral/Command/Tests/CommandTest.php +++ b/Behavioral/Command/Tests/CommandTest.php @@ -5,8 +5,9 @@ use DesignPatterns\Behavioral\Command\HelloCommand; use DesignPatterns\Behavioral\Command\Invoker; use DesignPatterns\Behavioral\Command\Receiver; +use PHPUnit\Framework\TestCase; -class CommandTest extends \PHPUnit_Framework_TestCase +class CommandTest extends TestCase { public function testInvocation() { diff --git a/Behavioral/Command/Tests/UndoableCommandTest.php b/Behavioral/Command/Tests/UndoableCommandTest.php index 8d102593f..708c736c9 100644 --- a/Behavioral/Command/Tests/UndoableCommandTest.php +++ b/Behavioral/Command/Tests/UndoableCommandTest.php @@ -6,8 +6,9 @@ use DesignPatterns\Behavioral\Command\HelloCommand; use DesignPatterns\Behavioral\Command\Invoker; use DesignPatterns\Behavioral\Command\Receiver; +use PHPUnit\Framework\TestCase; -class UndoableCommandTest extends \PHPUnit_Framework_TestCase +class UndoableCommandTest extends TestCase { public function testInvocation() { diff --git a/Behavioral/Iterator/Tests/IteratorTest.php b/Behavioral/Iterator/Tests/IteratorTest.php index 78ba617c0..5a6307828 100644 --- a/Behavioral/Iterator/Tests/IteratorTest.php +++ b/Behavioral/Iterator/Tests/IteratorTest.php @@ -6,8 +6,9 @@ use DesignPatterns\Behavioral\Iterator\BookList; use DesignPatterns\Behavioral\Iterator\BookListIterator; use DesignPatterns\Behavioral\Iterator\BookListReverseIterator; +use PHPUnit\Framework\TestCase; -class IteratorTest extends \PHPUnit_Framework_TestCase +class IteratorTest extends TestCase { public function testCanIterateOverBookList() { diff --git a/Behavioral/Mediator/Tests/MediatorTest.php b/Behavioral/Mediator/Tests/MediatorTest.php index 2cd40a6a5..31a4b7702 100644 --- a/Behavioral/Mediator/Tests/MediatorTest.php +++ b/Behavioral/Mediator/Tests/MediatorTest.php @@ -6,8 +6,9 @@ use DesignPatterns\Behavioral\Mediator\Subsystem\Client; use DesignPatterns\Behavioral\Mediator\Subsystem\Database; use DesignPatterns\Behavioral\Mediator\Subsystem\Server; +use PHPUnit\Framework\TestCase; -class MediatorTest extends \PHPUnit_Framework_TestCase +class MediatorTest extends TestCase { public function testOutputHelloWorld() { diff --git a/Behavioral/Memento/Tests/MementoTest.php b/Behavioral/Memento/Tests/MementoTest.php index 65d7e9857..656a58ccd 100644 --- a/Behavioral/Memento/Tests/MementoTest.php +++ b/Behavioral/Memento/Tests/MementoTest.php @@ -4,8 +4,9 @@ use DesignPatterns\Behavioral\Memento\State; use DesignPatterns\Behavioral\Memento\Ticket; +use PHPUnit\Framework\TestCase; -class MementoTest extends \PHPUnit_Framework_TestCase +class MementoTest extends TestCase { public function testOpenTicketAssignAndSetBackToOpen() { diff --git a/Behavioral/NullObject/Tests/LoggerTest.php b/Behavioral/NullObject/Tests/LoggerTest.php index 0e35aa51e..6b2ab30dc 100644 --- a/Behavioral/NullObject/Tests/LoggerTest.php +++ b/Behavioral/NullObject/Tests/LoggerTest.php @@ -5,8 +5,9 @@ use DesignPatterns\Behavioral\NullObject\NullLogger; use DesignPatterns\Behavioral\NullObject\PrintLogger; use DesignPatterns\Behavioral\NullObject\Service; +use PHPUnit\Framework\TestCase; -class LoggerTest extends \PHPUnit_Framework_TestCase +class LoggerTest extends TestCase { public function testNullObject() { diff --git a/Behavioral/Observer/Tests/ObserverTest.php b/Behavioral/Observer/Tests/ObserverTest.php index c26399749..d7762d852 100644 --- a/Behavioral/Observer/Tests/ObserverTest.php +++ b/Behavioral/Observer/Tests/ObserverTest.php @@ -4,8 +4,9 @@ use DesignPatterns\Behavioral\Observer\User; use DesignPatterns\Behavioral\Observer\UserObserver; +use PHPUnit\Framework\TestCase; -class ObserverTest extends \PHPUnit_Framework_TestCase +class ObserverTest extends TestCase { public function testChangeInUserLeadsToUserObserverBeingNotified() { diff --git a/Behavioral/Specification/Tests/SpecificationTest.php b/Behavioral/Specification/Tests/SpecificationTest.php index e106839de..34e4db466 100644 --- a/Behavioral/Specification/Tests/SpecificationTest.php +++ b/Behavioral/Specification/Tests/SpecificationTest.php @@ -7,8 +7,9 @@ use DesignPatterns\Behavioral\Specification\OrSpecification; use DesignPatterns\Behavioral\Specification\AndSpecification; use DesignPatterns\Behavioral\Specification\PriceSpecification; +use PHPUnit\Framework\TestCase; -class SpecificationTest extends \PHPUnit_Framework_TestCase +class SpecificationTest extends TestCase { public function testCanOr() { diff --git a/Behavioral/State/Tests/StateTest.php b/Behavioral/State/Tests/StateTest.php index 637ad9aa5..7f9ea4e7d 100644 --- a/Behavioral/State/Tests/StateTest.php +++ b/Behavioral/State/Tests/StateTest.php @@ -3,8 +3,9 @@ namespace DesignPatterns\Behavioral\State\Tests; use DesignPatterns\Behavioral\State\OrderRepository; +use PHPUnit\Framework\TestCase; -class StateTest extends \PHPUnit_Framework_TestCase +class StateTest extends TestCase { public function testCanShipCreatedOrder() { diff --git a/Behavioral/Strategy/Tests/StrategyTest.php b/Behavioral/Strategy/Tests/StrategyTest.php index 033a4a941..a31091049 100644 --- a/Behavioral/Strategy/Tests/StrategyTest.php +++ b/Behavioral/Strategy/Tests/StrategyTest.php @@ -5,8 +5,9 @@ use DesignPatterns\Behavioral\Strategy\DateComparator; use DesignPatterns\Behavioral\Strategy\IdComparator; use DesignPatterns\Behavioral\Strategy\ObjectCollection; +use PHPUnit\Framework\TestCase; -class StrategyTest extends \PHPUnit_Framework_TestCase +class StrategyTest extends TestCase { public function provideIntegers() { diff --git a/Behavioral/TemplateMethod/Tests/JourneyTest.php b/Behavioral/TemplateMethod/Tests/JourneyTest.php index 26c1763be..25bdd5176 100644 --- a/Behavioral/TemplateMethod/Tests/JourneyTest.php +++ b/Behavioral/TemplateMethod/Tests/JourneyTest.php @@ -3,8 +3,9 @@ namespace DesignPatterns\Behavioral\TemplateMethod\Tests; use DesignPatterns\Behavioral\TemplateMethod; +use PHPUnit\Framework\TestCase; -class JourneyTest extends \PHPUnit_Framework_TestCase +class JourneyTest extends TestCase { public function testCanGetOnVacationOnTheBeach() { diff --git a/Behavioral/Visitor/Tests/VisitorTest.php b/Behavioral/Visitor/Tests/VisitorTest.php index ce6480b95..e09cd2c2e 100644 --- a/Behavioral/Visitor/Tests/VisitorTest.php +++ b/Behavioral/Visitor/Tests/VisitorTest.php @@ -3,8 +3,9 @@ namespace DesignPatterns\Tests\Visitor\Tests; use DesignPatterns\Behavioral\Visitor; +use PHPUnit\Framework\TestCase; -class VisitorTest extends \PHPUnit_Framework_TestCase +class VisitorTest extends TestCase { /** * @var Visitor\RoleVisitor diff --git a/Creational/AbstractFactory/Tests/AbstractFactoryTest.php b/Creational/AbstractFactory/Tests/AbstractFactoryTest.php index 1bdbd1c97..ac9d7640c 100644 --- a/Creational/AbstractFactory/Tests/AbstractFactoryTest.php +++ b/Creational/AbstractFactory/Tests/AbstractFactoryTest.php @@ -4,8 +4,9 @@ use DesignPatterns\Creational\AbstractFactory\HtmlFactory; use DesignPatterns\Creational\AbstractFactory\JsonFactory; +use PHPUnit\Framework\TestCase; -class AbstractFactoryTest extends \PHPUnit_Framework_TestCase +class AbstractFactoryTest extends TestCase { public function testCanCreateHtmlText() { diff --git a/Creational/Builder/Tests/DirectorTest.php b/Creational/Builder/Tests/DirectorTest.php index 0d68ccbd1..2c114a204 100644 --- a/Creational/Builder/Tests/DirectorTest.php +++ b/Creational/Builder/Tests/DirectorTest.php @@ -5,8 +5,9 @@ use DesignPatterns\Creational\Builder\TruckBuilder; use DesignPatterns\Creational\Builder\CarBuilder; use DesignPatterns\Creational\Builder\Director; +use PHPUnit\Framework\TestCase; -class DirectorTest extends \PHPUnit_Framework_TestCase +class DirectorTest extends TestCase { public function testCanBuildTruck() { diff --git a/Creational/FactoryMethod/Tests/FactoryMethodTest.php b/Creational/FactoryMethod/Tests/FactoryMethodTest.php index 263b0cb66..8a87df029 100644 --- a/Creational/FactoryMethod/Tests/FactoryMethodTest.php +++ b/Creational/FactoryMethod/Tests/FactoryMethodTest.php @@ -5,8 +5,9 @@ use DesignPatterns\Creational\FactoryMethod\FactoryMethod; use DesignPatterns\Creational\FactoryMethod\GermanFactory; use DesignPatterns\Creational\FactoryMethod\ItalianFactory; +use PHPUnit\Framework\TestCase; -class FactoryMethodTest extends \PHPUnit_Framework_TestCase +class FactoryMethodTest extends TestCase { public function testCanCreateCheapVehicleInGermany() { diff --git a/Creational/Multiton/Tests/MultitonTest.php b/Creational/Multiton/Tests/MultitonTest.php index 0d0d29291..86251238f 100644 --- a/Creational/Multiton/Tests/MultitonTest.php +++ b/Creational/Multiton/Tests/MultitonTest.php @@ -3,8 +3,9 @@ namespace DesignPatterns\Creational\Multition\Tests; use DesignPatterns\Creational\Multiton\Multiton; +use PHPUnit\Framework\TestCase; -class MultitonTest extends \PHPUnit_Framework_TestCase +class MultitonTest extends TestCase { public function testUniqueness() { diff --git a/Creational/Pool/Tests/PoolTest.php b/Creational/Pool/Tests/PoolTest.php index 99bf87430..b115d390c 100644 --- a/Creational/Pool/Tests/PoolTest.php +++ b/Creational/Pool/Tests/PoolTest.php @@ -3,8 +3,9 @@ namespace DesignPatterns\Creational\Pool\Tests; use DesignPatterns\Creational\Pool\WorkerPool; +use PHPUnit\Framework\TestCase; -class PoolTest extends \PHPUnit_Framework_TestCase +class PoolTest extends TestCase { public function testCanGetNewInstancesWithGet() { diff --git a/Creational/Prototype/Tests/PrototypeTest.php b/Creational/Prototype/Tests/PrototypeTest.php index 7e9c85496..8f6683dc8 100644 --- a/Creational/Prototype/Tests/PrototypeTest.php +++ b/Creational/Prototype/Tests/PrototypeTest.php @@ -4,8 +4,9 @@ use DesignPatterns\Creational\Prototype\BarBookPrototype; use DesignPatterns\Creational\Prototype\FooBookPrototype; +use PHPUnit\Framework\TestCase; -class PrototypeTest extends \PHPUnit_Framework_TestCase +class PrototypeTest extends TestCase { public function testCanGetFooBook() { diff --git a/Creational/SimpleFactory/Tests/SimpleFactoryTest.php b/Creational/SimpleFactory/Tests/SimpleFactoryTest.php index 16899eb83..637e7b74a 100644 --- a/Creational/SimpleFactory/Tests/SimpleFactoryTest.php +++ b/Creational/SimpleFactory/Tests/SimpleFactoryTest.php @@ -3,8 +3,9 @@ namespace DesignPatterns\Creational\SimpleFactory\Tests; use DesignPatterns\Creational\SimpleFactory\SimpleFactory; +use PHPUnit\Framework\TestCase; -class SimpleFactoryTest extends \PHPUnit_Framework_TestCase +class SimpleFactoryTest extends TestCase { public function testCanCreateBicycle() { diff --git a/Creational/Singleton/Tests/SingletonTest.php b/Creational/Singleton/Tests/SingletonTest.php index 27dc5f116..20c68a28b 100644 --- a/Creational/Singleton/Tests/SingletonTest.php +++ b/Creational/Singleton/Tests/SingletonTest.php @@ -3,8 +3,9 @@ namespace DesignPatterns\Creational\Singleton\Tests; use DesignPatterns\Creational\Singleton\Singleton; +use PHPUnit\Framework\TestCase; -class SingletonTest extends \PHPUnit_Framework_TestCase +class SingletonTest extends TestCase { public function testUniqueness() { diff --git a/Creational/StaticFactory/Tests/StaticFactoryTest.php b/Creational/StaticFactory/Tests/StaticFactoryTest.php index cd1362dc1..e9f771262 100644 --- a/Creational/StaticFactory/Tests/StaticFactoryTest.php +++ b/Creational/StaticFactory/Tests/StaticFactoryTest.php @@ -3,8 +3,9 @@ namespace DesignPatterns\Creational\StaticFactory\Tests; use DesignPatterns\Creational\StaticFactory\StaticFactory; +use PHPUnit\Framework\TestCase; -class StaticFactoryTest extends \PHPUnit_Framework_TestCase +class StaticFactoryTest extends TestCase { public function testCanCreateNumberFormatter() { diff --git a/More/Delegation/Tests/DelegationTest.php b/More/Delegation/Tests/DelegationTest.php index 8660ef7ee..888555ada 100644 --- a/More/Delegation/Tests/DelegationTest.php +++ b/More/Delegation/Tests/DelegationTest.php @@ -3,8 +3,9 @@ namespace DesignPatterns\More\Delegation\Tests; use DesignPatterns\More\Delegation; +use PHPUnit\Framework\TestCase; -class DelegationTest extends \PHPUnit_Framework_TestCase +class DelegationTest extends TestCase { public function testHowTeamLeadWriteCode() { diff --git a/More/EAV/Tests/EAVTest.php b/More/EAV/Tests/EAVTest.php index a21009841..c170a436b 100644 --- a/More/EAV/Tests/EAVTest.php +++ b/More/EAV/Tests/EAVTest.php @@ -5,8 +5,9 @@ use DesignPatterns\More\EAV\Attribute; use DesignPatterns\More\EAV\Entity; use DesignPatterns\More\EAV\Value; +use PHPUnit\Framework\TestCase; -class EAVTest extends \PHPUnit_Framework_TestCase +class EAVTest extends TestCase { public function testCanAddAttributeToEntity() { diff --git a/More/Repository/Tests/RepositoryTest.php b/More/Repository/Tests/RepositoryTest.php index 89fd2fb64..c3b77c997 100644 --- a/More/Repository/Tests/RepositoryTest.php +++ b/More/Repository/Tests/RepositoryTest.php @@ -5,8 +5,9 @@ use DesignPatterns\More\Repository\MemoryStorage; use DesignPatterns\More\Repository\Post; use DesignPatterns\More\Repository\PostRepository; +use PHPUnit\Framework\TestCase; -class Repository extends \PHPUnit_Framework_TestCase +class Repository extends TestCase { public function testCanPersistAndFindPost() { diff --git a/More/ServiceLocator/Tests/ServiceLocatorTest.php b/More/ServiceLocator/Tests/ServiceLocatorTest.php index 23e242460..631a5adce 100644 --- a/More/ServiceLocator/Tests/ServiceLocatorTest.php +++ b/More/ServiceLocator/Tests/ServiceLocatorTest.php @@ -4,7 +4,7 @@ use DesignPatterns\More\ServiceLocator\LogService; use DesignPatterns\More\ServiceLocator\ServiceLocator; -use PHPUnit_Framework_TestCase as TestCase; +use PHPUnit\Framework\TestCase; class ServiceLocatorTest extends TestCase { diff --git a/Structural/Adapter/Tests/AdapterTest.php b/Structural/Adapter/Tests/AdapterTest.php index 8f0069a6e..d2db30ef2 100644 --- a/Structural/Adapter/Tests/AdapterTest.php +++ b/Structural/Adapter/Tests/AdapterTest.php @@ -5,8 +5,9 @@ use DesignPatterns\Structural\Adapter\Book; use DesignPatterns\Structural\Adapter\EBookAdapter; use DesignPatterns\Structural\Adapter\Kindle; +use PHPUnit\Framework\TestCase; -class AdapterTest extends \PHPUnit_Framework_TestCase +class AdapterTest extends TestCase { public function testCanTurnPageOnBook() { diff --git a/Structural/Bridge/Tests/BridgeTest.php b/Structural/Bridge/Tests/BridgeTest.php index 2f70e8701..9b3e3aa05 100644 --- a/Structural/Bridge/Tests/BridgeTest.php +++ b/Structural/Bridge/Tests/BridgeTest.php @@ -5,8 +5,9 @@ use DesignPatterns\Structural\Bridge\HelloWorldService; use DesignPatterns\Structural\Bridge\HtmlFormatter; use DesignPatterns\Structural\Bridge\PlainTextFormatter; +use PHPUnit\Framework\TestCase; -class BridgeTest extends \PHPUnit_Framework_TestCase +class BridgeTest extends TestCase { public function testCanPrintUsingThePlainTextPrinter() { diff --git a/Structural/Composite/Tests/CompositeTest.php b/Structural/Composite/Tests/CompositeTest.php index 5ea803cfe..da5bbb7a1 100644 --- a/Structural/Composite/Tests/CompositeTest.php +++ b/Structural/Composite/Tests/CompositeTest.php @@ -3,8 +3,9 @@ namespace DesignPatterns\Structural\Composite\Tests; use DesignPatterns\Structural\Composite; +use PHPUnit\Framework\TestCase; -class CompositeTest extends \PHPUnit_Framework_TestCase +class CompositeTest extends TestCase { public function testRender() { diff --git a/Structural/DataMapper/Tests/DataMapperTest.php b/Structural/DataMapper/Tests/DataMapperTest.php index 402ed3fd7..9738fe19f 100644 --- a/Structural/DataMapper/Tests/DataMapperTest.php +++ b/Structural/DataMapper/Tests/DataMapperTest.php @@ -4,8 +4,9 @@ use DesignPatterns\Structural\DataMapper\StorageAdapter; use DesignPatterns\Structural\DataMapper\UserMapper; +use PHPUnit\Framework\TestCase; -class DataMapperTest extends \PHPUnit_Framework_TestCase +class DataMapperTest extends TestCase { public function testCanMapUserFromStorage() { diff --git a/Structural/Decorator/Tests/DecoratorTest.php b/Structural/Decorator/Tests/DecoratorTest.php index 563df4926..100100de8 100644 --- a/Structural/Decorator/Tests/DecoratorTest.php +++ b/Structural/Decorator/Tests/DecoratorTest.php @@ -3,8 +3,9 @@ namespace DesignPatterns\Structural\Decorator\Tests; use DesignPatterns\Structural\Decorator; +use PHPUnit\Framework\TestCase; -class DecoratorTest extends \PHPUnit_Framework_TestCase +class DecoratorTest extends TestCase { /** * @var Decorator\Webservice diff --git a/Structural/DependencyInjection/Tests/DependencyInjectionTest.php b/Structural/DependencyInjection/Tests/DependencyInjectionTest.php index 3749d57cf..c2375f36f 100644 --- a/Structural/DependencyInjection/Tests/DependencyInjectionTest.php +++ b/Structural/DependencyInjection/Tests/DependencyInjectionTest.php @@ -4,8 +4,9 @@ use DesignPatterns\Structural\DependencyInjection\DatabaseConfiguration; use DesignPatterns\Structural\DependencyInjection\DatabaseConnection; +use PHPUnit\Framework\TestCase; -class DependencyInjectionTest extends \PHPUnit_Framework_TestCase +class DependencyInjectionTest extends TestCase { public function testDependencyInjection() { diff --git a/Structural/Facade/Tests/FacadeTest.php b/Structural/Facade/Tests/FacadeTest.php index 8c6a0a654..de75ae23a 100644 --- a/Structural/Facade/Tests/FacadeTest.php +++ b/Structural/Facade/Tests/FacadeTest.php @@ -4,8 +4,9 @@ use DesignPatterns\Structural\Facade\Facade; use DesignPatterns\Structural\Facade\OsInterface; +use PHPUnit\Framework\TestCase; -class FacadeTest extends \PHPUnit_Framework_TestCase +class FacadeTest extends TestCase { public function testComputerOn() { diff --git a/Structural/FluentInterface/Tests/FluentInterfaceTest.php b/Structural/FluentInterface/Tests/FluentInterfaceTest.php index b75e2f985..ff1c058c8 100644 --- a/Structural/FluentInterface/Tests/FluentInterfaceTest.php +++ b/Structural/FluentInterface/Tests/FluentInterfaceTest.php @@ -3,8 +3,9 @@ namespace DesignPatterns\Structural\FluentInterface\Tests; use DesignPatterns\Structural\FluentInterface\Sql; +use PHPUnit\Framework\TestCase; -class FluentInterfaceTest extends \PHPUnit_Framework_TestCase +class FluentInterfaceTest extends TestCase { public function testBuildSQL() { diff --git a/Structural/Flyweight/Tests/FlyweightTest.php b/Structural/Flyweight/Tests/FlyweightTest.php index 5f6345638..7380f4675 100644 --- a/Structural/Flyweight/Tests/FlyweightTest.php +++ b/Structural/Flyweight/Tests/FlyweightTest.php @@ -3,8 +3,9 @@ namespace DesignPatterns\Structural\Flyweight\Tests; use DesignPatterns\Structural\Flyweight\FlyweightFactory; +use PHPUnit\Framework\TestCase; -class FlyweightTest extends \PHPUnit_Framework_TestCase +class FlyweightTest extends TestCase { private $characters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']; diff --git a/Structural/Proxy/Tests/ProxyTest.php b/Structural/Proxy/Tests/ProxyTest.php index efdf3f35e..a24776e0f 100644 --- a/Structural/Proxy/Tests/ProxyTest.php +++ b/Structural/Proxy/Tests/ProxyTest.php @@ -4,8 +4,9 @@ use DesignPatterns\Structural\Decorator; use DesignPatterns\Structural\Proxy\RecordProxy; +use PHPUnit\Framework\TestCase; -class ProxyTest extends \PHPUnit_Framework_TestCase +class ProxyTest extends TestCase { public function testWillSetDirtyFlagInProxy() { diff --git a/Structural/Registry/Tests/RegistryTest.php b/Structural/Registry/Tests/RegistryTest.php index 63053db47..3559b89f4 100644 --- a/Structural/Registry/Tests/RegistryTest.php +++ b/Structural/Registry/Tests/RegistryTest.php @@ -3,8 +3,9 @@ namespace DesignPatterns\Structural\Registry\Tests; use DesignPatterns\Structural\Registry\Registry; +use PHPUnit\Framework\TestCase; -class RegistryTest extends \PHPUnit_Framework_TestCase +class RegistryTest extends TestCase { public function testSetAndGetLogger() {