Merge pull request #278 from sbine/master

Various minor fixes
This commit is contained in:
Dominik Liebler
2017-04-06 13:07:44 +02:00
committed by GitHub
8 changed files with 11 additions and 11 deletions

View File

@@ -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());
}
}

View File

@@ -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());
}
}

View File

@@ -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

View File

@@ -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()
{

View File

@@ -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

View File

@@ -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

View File

@@ -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 "

View File

@@ -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