mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-16 21:01:16 +02:00
Fix argument order in assertEquals
Correct order is ($expected, $actual)
This commit is contained in:
@@ -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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user