mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-06 15:06:31 +02:00
Adapt Unit Tests code to PHPUnit 6
This commit is contained in:
@@ -4,8 +4,9 @@ namespace DesignPatterns\Creational\AbstractFactory\Tests;
|
||||
|
||||
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()
|
||||
{
|
||||
|
@@ -5,8 +5,9 @@ namespace DesignPatterns\Creational\Builder\Tests;
|
||||
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()
|
||||
{
|
||||
|
@@ -5,8 +5,9 @@ namespace DesignPatterns\Creational\FactoryMethod\Tests;
|
||||
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()
|
||||
{
|
||||
|
@@ -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()
|
||||
{
|
||||
|
@@ -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()
|
||||
{
|
||||
|
@@ -4,8 +4,9 @@ namespace DesignPatterns\Creational\Prototype\Tests;
|
||||
|
||||
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()
|
||||
{
|
||||
|
@@ -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()
|
||||
{
|
||||
|
@@ -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()
|
||||
{
|
||||
|
@@ -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()
|
||||
{
|
||||
|
Reference in New Issue
Block a user