mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-25 01:01:19 +02:00
@@ -16,6 +16,6 @@ class CommandTest extends TestCase
|
||||
|
||||
$invoker->setCommand(new HelloCommand($receiver));
|
||||
$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->run();
|
||||
$this->assertEquals($receiver->getOutput(), 'Hello World');
|
||||
$this->assertEquals('Hello World', $receiver->getOutput());
|
||||
|
||||
$messageDateCommand = new AddMessageDateCommand($receiver);
|
||||
$messageDateCommand->execute();
|
||||
|
||||
$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();
|
||||
|
||||
$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());
|
||||
}
|
||||
}
|
||||
|
@@ -23,7 +23,7 @@ class StrategyTest extends TestCase
|
||||
];
|
||||
}
|
||||
|
||||
public function providateDates()
|
||||
public function provideDates()
|
||||
{
|
||||
return [
|
||||
[
|
||||
@@ -54,7 +54,7 @@ class StrategyTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providateDates
|
||||
* @dataProvider provideDates
|
||||
*
|
||||
* @param array $collection
|
||||
* @param array $expected
|
||||
|
@@ -7,7 +7,7 @@ use DesignPatterns\More\Repository\Post;
|
||||
use DesignPatterns\More\Repository\PostRepository;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class Repository extends TestCase
|
||||
class RepositoryTest extends TestCase
|
||||
{
|
||||
public function testCanPersistAndFindPost()
|
||||
{
|
||||
|
@@ -20,7 +20,7 @@ msgid "Purpose"
|
||||
msgstr ""
|
||||
|
||||
#: ../../Behavioral/Iterator/README.rst:7
|
||||
msgid To make an object iterable and to make it appear like a collection of objects."
|
||||
msgid "To make an object iterable and to make it appear like a collection of objects."
|
||||
msgstr ""
|
||||
|
||||
#: ../../Behavioral/Iterator/README.rst:11
|
||||
|
@@ -29,7 +29,7 @@ msgstr ""
|
||||
#: ../../Creational/FactoryMethod/README.rst:12
|
||||
msgid ""
|
||||
"This pattern is a \"real\" Design Pattern because it achieves the "
|
||||
"Dependency Inversion Principle" a.k.a the "D" in S.O.L.I.D principles."
|
||||
"\"Dependency Inversion Principle\" a.k.a the \"D\" in S.O.L.I.D principles."
|
||||
msgstr ""
|
||||
|
||||
#: ../../Creational/FactoryMethod/README.rst:15
|
||||
|
@@ -19,7 +19,7 @@ msgstr ""
|
||||
#: ../../Creational/Pool/README.rst:7
|
||||
msgid ""
|
||||
"The **object pool pattern** is a software creational design pattern that "
|
||||
"uses a set of initialized objects kept ready to use – a "pool" – rather "
|
||||
"uses a set of initialized objects kept ready to use – a \"pool\" – rather "
|
||||
"than allocating and destroying them on demand. A client of the pool will "
|
||||
"request an object from the pool and perform operations on the returned "
|
||||
"object. When the client has finished, it returns the object, which is a "
|
||||
|
@@ -20,7 +20,7 @@ msgid "Purpose"
|
||||
msgstr ""
|
||||
|
||||
#: ../../Behavioral/Iterator/README.rst:7
|
||||
msgid To make an object iterable and to make it appear like a collection of objects."
|
||||
msgid "To make an object iterable and to make it appear like a collection of objects."
|
||||
msgstr ""
|
||||
|
||||
#: ../../Behavioral/Iterator/README.rst:11
|
||||
|
Reference in New Issue
Block a user