7
7
use Clearcode \CommandBusConsole \ValueConverter \IntConverter ;
8
8
use Clearcode \CommandBusConsole \ValueConverter \UuidConverter ;
9
9
use Ramsey \Uuid \Uuid ;
10
- use tests \Clearcode \CommandBusConsole \Mocks \DummyCommand ;
10
+ use tests \Clearcode \CommandBusConsole \Mocks \SignUpUser ;
11
11
use tests \Clearcode \CommandBusConsole \Mocks \DummyCommandWithUuid ;
12
12
13
13
class CommandReflectionTest extends \PHPUnit_Framework_TestCase
@@ -17,7 +17,7 @@ class CommandReflectionTest extends \PHPUnit_Framework_TestCase
17
17
*/
18
18
public function it_can_be_created_from_class_name ()
19
19
{
20
- $ commandReflection = CommandReflection::fromClass (DummyCommand ::class);
20
+ $ commandReflection = CommandReflection::fromClass (SignUpUser ::class);
21
21
22
22
\PHPUnit_Framework_Assert::assertInstanceOf (CommandReflection::class, $ commandReflection );
23
23
}
@@ -28,14 +28,14 @@ public function it_can_be_created_from_class_name()
28
28
public function it_returns_new_command_instance ()
29
29
{
30
30
$ argumentProcessor = new ArgumentsProcessor ([new IntConverter ()]);
31
- $ commandReflection = CommandReflection::fromClass (DummyCommand ::class);
31
+ $ commandReflection = CommandReflection::fromClass (SignUpUser ::class);
32
32
33
- $ commandParameters = ['lorem ipsum ' , '2 ' ];
33
+ $ commandParameters = ['Jacek Jagiello ' , 'j.jagiello@clearcode.cc ' ];
34
34
$ command = $ commandReflection ->createCommand ($ commandParameters , $ argumentProcessor );
35
35
36
- \PHPUnit_Framework_Assert::assertInstanceOf (DummyCommand ::class, $ command );
37
- \PHPUnit_Framework_Assert::assertEquals ('lorem ipsum ' , $ command ->argument1 );
38
- \PHPUnit_Framework_Assert::assertTrue (2 === $ command ->argument2 );
36
+ \PHPUnit_Framework_Assert::assertInstanceOf (SignUpUser ::class, $ command );
37
+ \PHPUnit_Framework_Assert::assertEquals ('Jacek Jagiello ' , $ command ->fullName );
38
+ \PHPUnit_Framework_Assert::assertTrue (' j.jagiello@clearcode.cc ' === $ command ->email );
39
39
}
40
40
41
41
/**
@@ -59,12 +59,12 @@ public function it_returns_new_command_with_uuid_instance()
59
59
*/
60
60
public function it_returns_command_constructor_parameters ()
61
61
{
62
- $ commandReflection = CommandReflection::fromClass (DummyCommand ::class);
62
+ $ commandReflection = CommandReflection::fromClass (SignUpUser ::class);
63
63
64
64
$ commandParameters = $ commandReflection ->parameters ();
65
65
66
- \PHPUnit_Framework_Assert::assertEquals ('argument1 ' , $ commandParameters [0 ]->name );
67
- \PHPUnit_Framework_Assert::assertEquals ('argument2 ' , $ commandParameters [1 ]->name );
66
+ \PHPUnit_Framework_Assert::assertEquals ('fullName ' , $ commandParameters [0 ]->name );
67
+ \PHPUnit_Framework_Assert::assertEquals ('email ' , $ commandParameters [1 ]->name );
68
68
}
69
69
70
70
/**
0 commit comments