mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-30 19:50:12 +02:00
Adapt Unit Tests code to PHPUnit 6
This commit is contained in:
@@ -5,8 +5,9 @@ namespace DesignPatterns\Structural\Adapter\Tests;
|
||||
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()
|
||||
{
|
||||
|
@@ -5,8 +5,9 @@ namespace DesignPatterns\Structural\Bridge\Tests;
|
||||
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()
|
||||
{
|
||||
|
@@ -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()
|
||||
{
|
||||
|
@@ -4,8 +4,9 @@ namespace DesignPatterns\Structural\DataMapper\Tests;
|
||||
|
||||
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()
|
||||
{
|
||||
|
@@ -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
|
||||
|
@@ -4,8 +4,9 @@ namespace DesignPatterns\Structural\DependencyInjection\Tests;
|
||||
|
||||
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()
|
||||
{
|
||||
|
@@ -4,8 +4,9 @@ namespace DesignPatterns\Structural\Facade\Tests;
|
||||
|
||||
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()
|
||||
{
|
||||
|
@@ -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()
|
||||
{
|
||||
|
@@ -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'];
|
||||
|
@@ -4,8 +4,9 @@ namespace DesignPatterns\Structural\Proxy\Tests;
|
||||
|
||||
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()
|
||||
{
|
||||
|
@@ -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()
|
||||
{
|
||||
|
Reference in New Issue
Block a user