Behavioral\Command restructured

This commit is contained in:
Antonio Spinelli
2014-03-24 09:14:05 -03:00
parent e59d70a0ac
commit 3e515daa0f
5 changed files with 15 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
<?php
namespace DesignPatterns\Command;
namespace DesignPatterns\Behavioral\Command;
/**
* class CommandInterface

View File

@@ -1,6 +1,6 @@
<?php
namespace DesignPatterns\Command;
namespace DesignPatterns\Behavioral\Command;
/**
* This concrete command calls "print" on the Receiver, but an external

View File

@@ -1,6 +1,6 @@
<?php
namespace DesignPatterns\Command;
namespace DesignPatterns\Behavioral\Command;
/**
* Invoker is using the command given to it.

View File

@@ -1,6 +1,6 @@
<?php
namespace DesignPatterns\Command;
namespace DesignPatterns\Behavioral\Command;
/**
* Receiver is specific service with its own contract and can be only concrete

View File

@@ -1,10 +1,10 @@
<?php
namespace DesignPatterns\Tests\Command;
namespace DesignPatterns\Behavioral\Command\Tests;
use DesignPatterns\Command\Invoker;
use DesignPatterns\Command\Receiver;
use DesignPatterns\Command\HelloCommand;
use DesignPatterns\Behavioral\Command\Invoker;
use DesignPatterns\Behavioral\Command\Receiver;
use DesignPatterns\Behavioral\Command\HelloCommand;
/**
* CommandTest has the role of the Client in the Command Pattern
@@ -12,12 +12,18 @@ use DesignPatterns\Command\HelloCommand;
class CommandTest extends \PHPUnit_Framework_TestCase
{
/**
* @var Invoker
*/
protected $invoker;
/**
* @var Receiver
*/
protected $receiver;
protected function setUp()
{
// this is the context of the application
$this->invoker = new Invoker();
$this->receiver = new Receiver();
}