it was created the Creational namespace and append its patterns

This commit is contained in:
Antonio Spinelli
2014-04-15 22:59:59 -03:00
parent 646e0e2fd9
commit 7bf6593e3f
53 changed files with 77 additions and 95 deletions

View File

@@ -1,6 +1,6 @@
<?php
namespace DesignPatterns\SimpleFactory;
namespace DesignPatterns\Creational\SimpleFactory;
/**
* Bicycle is a bicycle

View File

@@ -1,6 +1,6 @@
<?php
namespace DesignPatterns\SimpleFactory;
namespace DesignPatterns\Creational\SimpleFactory;
/**
* class ConcreteFactory

View File

@@ -1,6 +1,6 @@
<?php
namespace DesignPatterns\SimpleFactory;
namespace DesignPatterns\Creational\SimpleFactory;
/**
* Scooter is a Scooter

View File

@@ -1,8 +1,8 @@
<?php
namespace DesignPatterns\Tests\SimpleFactory;
namespace DesignPatterns\Creational\SimpleFactory;
use DesignPatterns\SimpleFactory\ConcreteFactory;
use DesignPatterns\Creational\SimpleFactory\ConcreteFactory;
/**
* SimpleFactoryTest tests the Simple Factory pattern
@@ -31,7 +31,7 @@ class SimpleFactoryTest extends \PHPUnit_Framework_TestCase
public function testCreation($type)
{
$obj = $this->factory->createVehicle($type);
$this->assertInstanceOf('DesignPatterns\SimpleFactory\VehicleInterface', $obj);
$this->assertInstanceOf('DesignPatterns\Creational\SimpleFactory\VehicleInterface', $obj);
}
/**

View File

@@ -1,6 +1,6 @@
<?php
namespace DesignPatterns\SimpleFactory;
namespace DesignPatterns\Creational\SimpleFactory;
/**
* VehicleInterface is a contract for a vehicle