File tree Expand file tree Collapse file tree 5 files changed +15
-9
lines changed Expand file tree Collapse file tree 5 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- namespace DesignPatterns \Command ;
3
+ namespace DesignPatterns \Behavioral \ Command ;
4
4
5
5
/**
6
6
* class CommandInterface
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- namespace DesignPatterns \Command ;
3
+ namespace DesignPatterns \Behavioral \ Command ;
4
4
5
5
/**
6
6
* This concrete command calls "print" on the Receiver, but an external
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- namespace DesignPatterns \Command ;
3
+ namespace DesignPatterns \Behavioral \ Command ;
4
4
5
5
/**
6
6
* Invoker is using the command given to it.
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- namespace DesignPatterns \Command ;
3
+ namespace DesignPatterns \Behavioral \ Command ;
4
4
5
5
/**
6
6
* Receiver is specific service with its own contract and can be only concrete
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- namespace DesignPatterns \Tests \Command ;
3
+ namespace DesignPatterns \Behavioral \Command \ Tests ;
4
4
5
- use DesignPatterns \Command \Invoker ;
6
- use DesignPatterns \Command \Receiver ;
7
- use DesignPatterns \Command \HelloCommand ;
5
+ use DesignPatterns \Behavioral \ Command \Invoker ;
6
+ use DesignPatterns \Behavioral \ Command \Receiver ;
7
+ use DesignPatterns \Behavioral \ Command \HelloCommand ;
8
8
9
9
/**
10
10
* CommandTest has the role of the Client in the Command Pattern
11
11
*/
12
12
class CommandTest extends \PHPUnit_Framework_TestCase
13
13
{
14
14
15
+ /**
16
+ * @var Invoker
17
+ */
15
18
protected $ invoker ;
19
+
20
+ /**
21
+ * @var Receiver
22
+ */
16
23
protected $ receiver ;
17
24
18
25
protected function setUp ()
19
26
{
20
- // this is the context of the application
21
27
$ this ->invoker = new Invoker ();
22
28
$ this ->receiver = new Receiver ();
23
29
}
You can’t perform that action at this time.
0 commit comments