mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-02-24 09:42:24 +01:00
Fix argument order in assertEquals
Correct order is ($expected, $actual)
This commit is contained in:
parent
2f467febbf
commit
07164b2739
@ -16,6 +16,6 @@ class CommandTest extends TestCase
|
|||||||
|
|
||||||
$invoker->setCommand(new HelloCommand($receiver));
|
$invoker->setCommand(new HelloCommand($receiver));
|
||||||
$invoker->run();
|
$invoker->run();
|
||||||
$this->assertEquals($receiver->getOutput(), 'Hello World');
|
$this->assertEquals('Hello World', $receiver->getOutput());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,17 +17,17 @@ class UndoableCommandTest extends TestCase
|
|||||||
|
|
||||||
$invoker->setCommand(new HelloCommand($receiver));
|
$invoker->setCommand(new HelloCommand($receiver));
|
||||||
$invoker->run();
|
$invoker->run();
|
||||||
$this->assertEquals($receiver->getOutput(), 'Hello World');
|
$this->assertEquals('Hello World', $receiver->getOutput());
|
||||||
|
|
||||||
$messageDateCommand = new AddMessageDateCommand($receiver);
|
$messageDateCommand = new AddMessageDateCommand($receiver);
|
||||||
$messageDateCommand->execute();
|
$messageDateCommand->execute();
|
||||||
|
|
||||||
$invoker->run();
|
$invoker->run();
|
||||||
$this->assertEquals($receiver->getOutput(), "Hello World\nHello World [".date('Y-m-d').']');
|
$this->assertEquals("Hello World\nHello World [".date('Y-m-d').']', $receiver->getOutput());
|
||||||
|
|
||||||
$messageDateCommand->undo();
|
$messageDateCommand->undo();
|
||||||
|
|
||||||
$invoker->run();
|
$invoker->run();
|
||||||
$this->assertEquals($receiver->getOutput(), "Hello World\nHello World [".date('Y-m-d')."]\nHello World");
|
$this->assertEquals("Hello World\nHello World [".date('Y-m-d')."]\nHello World", $receiver->getOutput());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user