From a8de079b7791a8fc0636e6a6f8b45d6d202ebe23 Mon Sep 17 00:00:00 2001 From: Grafikart Date: Mon, 13 Mar 2017 12:10:44 +0100 Subject: [PATCH 01/11] New tests, TagArrayToStringTransformer --- .../TagArrayToStringTransformer.php | 5 +- .../TagArrayToStringTransformerTest.php | 104 ++++++++++++++++++ 2 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php diff --git a/src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php b/src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php index 835a61907..5cc71879f 100644 --- a/src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php +++ b/src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php @@ -54,7 +54,10 @@ public function reverseTransform($string) return []; } - $names = explode(',', $string); + $names = array_unique(array_map(function($name) { + return trim($name); + }, explode(',', $string))); + // Get the current tags and find the new ones that should be created. $tags = $this->manager->getRepository(Tag::class)->findBy([ diff --git a/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php b/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php new file mode 100644 index 000000000..451293de1 --- /dev/null +++ b/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php @@ -0,0 +1,104 @@ +getMockBuilder(EntityRepository::class) + ->disableOriginalConstructor() + ->getMock(); + $tagRepository->expects($this->any()) + ->method('findBy') + ->will($this->returnValue($findByReturn)); + + $entityManager = $this + ->getMockBuilder(ObjectManager::class) + ->disableOriginalConstructor() + ->getMock(); + $entityManager->expects($this->any()) + ->method('getRepository') + ->will($this->returnValue($tagRepository)); + + return new TagArrayToStringTransformer($entityManager); + } + + /** + * Creates a new TagEntity instance + * @param $name + * @return Tag + */ + public function createTag($name) + { + $tag = new Tag(); + $tag->setName($name); + return $tag; + } + + /** + * Ensures tags are created correctly + */ + public function testCreateTheRightAmountOfTags() + { + $tags = $this->getMockedTransformer()->reverseTransform('Hello, Demo, How'); + $this->assertCount(3, $tags); + $this->assertEquals('Hello', $tags[0]->getName()); + } + + /** + * Spaces at the end (and begining) of a world shouldn't matter + */ + public function testTrimNames() + { + $tags = $this->getMockedTransformer()->reverseTransform(' Hello '); + $this->assertEquals('Hello', $tags[0]->getName()); + } + + /** + * Duplicate tags shouldn't create new entities + */ + public function testDuplicateNames() + { + $tags = $this->getMockedTransformer()->reverseTransform('Hello, Hello, Hello'); + $this->assertCount(1, $tags); + } + + /** + * This test ensure that the transformer uses tag already persisted in the Database + */ + public function testUsesAlreadyDefinedTags() + { + $persisted_tags = [ + $this->createTag('Hello'), + $this->createTag('World') + ]; + $tags = $this->getMockedTransformer($persisted_tags)->reverseTransform('Hello, World, How, Are, You'); + $this->assertCount(5, $tags); + $this->assertEquals($persisted_tags[0], $tags[0]); + $this->assertEquals($persisted_tags[1], $tags[1]); + } + + /** + * Tags should be transformed into a string + */ + public function testTransform () { + $persisted_tags = [ + $this->createTag('Hello'), + $this->createTag('World') + ]; + $transformed = $this->getMockedTransformer()->transform($persisted_tags); + $this->assertEquals('Hello,World', $transformed); + } + +} \ No newline at end of file From 55d5bb44b2019466afcbb0fbb90a9928233e5f8d Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 13 Mar 2017 12:15:53 +0100 Subject: [PATCH 02/11] Simplified some code --- .../Form/DataTransformer/TagArrayToStringTransformer.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php b/src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php index 5cc71879f..ac7c34d0d 100644 --- a/src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php +++ b/src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php @@ -54,9 +54,7 @@ public function reverseTransform($string) return []; } - $names = array_unique(array_map(function($name) { - return trim($name); - }, explode(',', $string))); + $names = array_unique(array_map('trim', explode(',', $string))); // Get the current tags and find the new ones that should be created. From 2ca2e9ba09f1d129efd88dae297bad56533b6aee Mon Sep 17 00:00:00 2001 From: Grafikart Date: Mon, 13 Mar 2017 12:18:02 +0100 Subject: [PATCH 03/11] Fixed some typos --- .../TagArrayToStringTransformer.php | 4 +-- .../TagArrayToStringTransformerTest.php | 30 ++++++++++--------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php b/src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php index 5cc71879f..ac7c34d0d 100644 --- a/src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php +++ b/src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php @@ -54,9 +54,7 @@ public function reverseTransform($string) return []; } - $names = array_unique(array_map(function($name) { - return trim($name); - }, explode(',', $string))); + $names = array_unique(array_map('trim', explode(',', $string))); // Get the current tags and find the new ones that should be created. diff --git a/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php b/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php index 451293de1..be1de9198 100644 --- a/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php +++ b/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php @@ -11,7 +11,8 @@ class TagArrayToStringTransformerTest extends \PHPUnit\Framework\TestCase { /** - * Get a mocked instance of the TagArrayToStringTransformer + * Get a mocked instance of the TagArrayToStringTransformer. + * * @return TagArrayToStringTransformer */ public function getMockedTransformer($findByReturn = []) @@ -35,7 +36,8 @@ public function getMockedTransformer($findByReturn = []) } /** - * Creates a new TagEntity instance + * Creates a new TagEntity instance. + * * @param $name * @return Tag */ @@ -47,26 +49,26 @@ public function createTag($name) } /** - * Ensures tags are created correctly + * Ensures tags are created correctly. */ public function testCreateTheRightAmountOfTags() { $tags = $this->getMockedTransformer()->reverseTransform('Hello, Demo, How'); $this->assertCount(3, $tags); - $this->assertEquals('Hello', $tags[0]->getName()); + $this->assertSame('Hello', $tags[0]->getName()); } /** - * Spaces at the end (and begining) of a world shouldn't matter + * Spaces at the end (and begining) of a world shouldn't matter. */ public function testTrimNames() { $tags = $this->getMockedTransformer()->reverseTransform(' Hello '); - $this->assertEquals('Hello', $tags[0]->getName()); + $this->assertSame('Hello', $tags[0]->getName()); } /** - * Duplicate tags shouldn't create new entities + * Duplicate tags shouldn't create new entities. */ public function testDuplicateNames() { @@ -75,30 +77,30 @@ public function testDuplicateNames() } /** - * This test ensure that the transformer uses tag already persisted in the Database + * This test ensure that the transformer uses tag already persisted in the Database. */ public function testUsesAlreadyDefinedTags() { $persisted_tags = [ $this->createTag('Hello'), - $this->createTag('World') + $this->createTag('World'), ]; $tags = $this->getMockedTransformer($persisted_tags)->reverseTransform('Hello, World, How, Are, You'); $this->assertCount(5, $tags); - $this->assertEquals($persisted_tags[0], $tags[0]); - $this->assertEquals($persisted_tags[1], $tags[1]); + $this->assertSame($persisted_tags[0], $tags[0]); + $this->assertSame($persisted_tags[1], $tags[1]); } /** - * Tags should be transformed into a string + * Tags should be transformed into a string. */ public function testTransform () { $persisted_tags = [ $this->createTag('Hello'), - $this->createTag('World') + $this->createTag('World'), ]; $transformed = $this->getMockedTransformer()->transform($persisted_tags); - $this->assertEquals('Hello,World', $transformed); + $this->assertSame('Hello,World', $transformed); } } \ No newline at end of file From 3e891f5be395f26b78669e4e8f1dac25205869cf Mon Sep 17 00:00:00 2001 From: Grafikart Date: Mon, 13 Mar 2017 12:23:02 +0100 Subject: [PATCH 04/11] Created a new case --- .../DataTransformer/TagArrayToStringTransformer.php | 5 +++-- .../TagArrayToStringTransformerTest.php | 10 ++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php b/src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php index ac7c34d0d..f974f6240 100644 --- a/src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php +++ b/src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php @@ -54,8 +54,9 @@ public function reverseTransform($string) return []; } - $names = array_unique(array_map('trim', explode(',', $string))); - + $names = array_filter(array_unique(array_map('trim', explode(',', $string))), function ($name) { + return !empty($name); + }); // Get the current tags and find the new ones that should be created. $tags = $this->manager->getRepository(Tag::class)->findBy([ diff --git a/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php b/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php index be1de9198..04f2bba05 100644 --- a/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php +++ b/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php @@ -58,6 +58,16 @@ public function testCreateTheRightAmountOfTags() $this->assertSame('Hello', $tags[0]->getName()); } + /** + * Too many commas. + */ + public function testCreateTheRightAmountOfTagsWithTooManyCommas() + { + $transformer = $this->getMockedTransformer(); + $this->assertCount(3, $transformer->reverseTransform('Hello, Demo,, How')); + $this->assertCount(3, $transformer->reverseTransform('Hello, Demo, How,')); + } + /** * Spaces at the end (and begining) of a world shouldn't matter. */ From 72a0f8524783e6c886c2bff362de2cb83390c28e Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 13 Mar 2017 12:27:28 +0100 Subject: [PATCH 05/11] Simplified code --- .../Form/DataTransformer/TagArrayToStringTransformer.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php b/src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php index f974f6240..e95bf7724 100644 --- a/src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php +++ b/src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php @@ -54,9 +54,7 @@ public function reverseTransform($string) return []; } - $names = array_filter(array_unique(array_map('trim', explode(',', $string))), function ($name) { - return !empty($name); - }); + $names = array_filter(array_unique(array_map('trim', explode(',', $string)))); // Get the current tags and find the new ones that should be created. $tags = $this->manager->getRepository(Tag::class)->findBy([ From b596f779dd0810697fbdaa71b32a52f7169403de Mon Sep 17 00:00:00 2001 From: Grafikart Date: Mon, 13 Mar 2017 12:33:24 +0100 Subject: [PATCH 06/11] Fixed typo --- .../DataTransformer/TagArrayToStringTransformerTest.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php b/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php index 04f2bba05..ed1b08cef 100644 --- a/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php +++ b/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php @@ -9,7 +9,6 @@ class TagArrayToStringTransformerTest extends \PHPUnit\Framework\TestCase { - /** * Get a mocked instance of the TagArrayToStringTransformer. * @@ -39,12 +38,14 @@ public function getMockedTransformer($findByReturn = []) * Creates a new TagEntity instance. * * @param $name + * * @return Tag */ public function createTag($name) { $tag = new Tag(); $tag->setName($name); + return $tag; } @@ -104,7 +105,8 @@ public function testUsesAlreadyDefinedTags() /** * Tags should be transformed into a string. */ - public function testTransform () { + public function testTransform() + { $persisted_tags = [ $this->createTag('Hello'), $this->createTag('World'), @@ -112,5 +114,4 @@ public function testTransform () { $transformed = $this->getMockedTransformer()->transform($persisted_tags); $this->assertSame('Hello,World', $transformed); } - -} \ No newline at end of file +} From e3ab52c3063e68c420726604fd1ddf544dbbd82e Mon Sep 17 00:00:00 2001 From: Grafikart Date: Mon, 13 Mar 2017 14:45:56 +0100 Subject: [PATCH 07/11] Fixed more typos --- .../TagArrayToStringTransformerTest.php | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php b/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php index ed1b08cef..6858f6a53 100644 --- a/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php +++ b/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php @@ -7,6 +7,13 @@ use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityRepository; +/** + * Tests that tags are transformed correctly using the data transformer. + * + * See http://symfony.com/doc/current/testing/database.html + * + * @author Jonathan Boyer + */ class TagArrayToStringTransformerTest extends \PHPUnit\Framework\TestCase { /** @@ -70,7 +77,7 @@ public function testCreateTheRightAmountOfTagsWithTooManyCommas() } /** - * Spaces at the end (and begining) of a world shouldn't matter. + * Spaces at the end (and beginning) of a world shouldn't matter. */ public function testTrimNames() { @@ -92,14 +99,14 @@ public function testDuplicateNames() */ public function testUsesAlreadyDefinedTags() { - $persisted_tags = [ + $persistedTags = [ $this->createTag('Hello'), $this->createTag('World'), ]; - $tags = $this->getMockedTransformer($persisted_tags)->reverseTransform('Hello, World, How, Are, You'); + $tags = $this->getMockedTransformer($persistedTags)->reverseTransform('Hello, World, How, Are, You'); $this->assertCount(5, $tags); - $this->assertSame($persisted_tags[0], $tags[0]); - $this->assertSame($persisted_tags[1], $tags[1]); + $this->assertSame($persistedTags[0], $tags[0]); + $this->assertSame($persistedTags[1], $tags[1]); } /** @@ -107,11 +114,11 @@ public function testUsesAlreadyDefinedTags() */ public function testTransform() { - $persisted_tags = [ + $persistedTags = [ $this->createTag('Hello'), $this->createTag('World'), ]; - $transformed = $this->getMockedTransformer()->transform($persisted_tags); + $transformed = $this->getMockedTransformer()->transform($persistedTags); $this->assertSame('Hello,World', $transformed); } } From 75734c63b79495d6d11bf430596316866f7baf1b Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 14 Mar 2017 12:05:05 +0100 Subject: [PATCH 08/11] Added Jonathan to the list of authors --- .../Form/DataTransformer/TagArrayToStringTransformer.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php b/src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php index e95bf7724..6ed04b40e 100644 --- a/src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php +++ b/src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php @@ -22,6 +22,7 @@ * See http://symfony.com/doc/current/form/data_transformers.html * * @author Yonel Ceruto + * @author Jonathan Boyer */ class TagArrayToStringTransformer implements DataTransformerInterface { From 0f14c576012835c39c860f7706533cdacc05f92b Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 14 Mar 2017 12:06:51 +0100 Subject: [PATCH 09/11] Added the missing license header and removed the author info Symfony policy is to *not* add the authors in test files. Personally I don't agree ... but in this repo we must follow the Symfony practices. That's why I removed you from here ... but I added you in the PHP class associated with this test. --- .../TagArrayToStringTransformerTest.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php b/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php index 6858f6a53..a848ae696 100644 --- a/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php +++ b/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Tests\AppBundle\Form\DataTransformer; use AppBundle\Entity\Tag; @@ -11,8 +20,6 @@ * Tests that tags are transformed correctly using the data transformer. * * See http://symfony.com/doc/current/testing/database.html - * - * @author Jonathan Boyer */ class TagArrayToStringTransformerTest extends \PHPUnit\Framework\TestCase { From 15a8d390f83d1ff224b4f899451e4b4245a0e554 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 14 Mar 2017 12:16:26 +0100 Subject: [PATCH 10/11] Minor changes * Moved the helper methods at the end of the file and made them `private` * Minor changes to match the code style of the other tests --- .../TagArrayToStringTransformerTest.php | 103 ++++++++++-------- 1 file changed, 57 insertions(+), 46 deletions(-) diff --git a/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php b/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php index a848ae696..528f64b73 100644 --- a/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php +++ b/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php @@ -24,85 +24,50 @@ class TagArrayToStringTransformerTest extends \PHPUnit\Framework\TestCase { /** - * Get a mocked instance of the TagArrayToStringTransformer. - * - * @return TagArrayToStringTransformer - */ - public function getMockedTransformer($findByReturn = []) - { - $tagRepository = $this->getMockBuilder(EntityRepository::class) - ->disableOriginalConstructor() - ->getMock(); - $tagRepository->expects($this->any()) - ->method('findBy') - ->will($this->returnValue($findByReturn)); - - $entityManager = $this - ->getMockBuilder(ObjectManager::class) - ->disableOriginalConstructor() - ->getMock(); - $entityManager->expects($this->any()) - ->method('getRepository') - ->will($this->returnValue($tagRepository)); - - return new TagArrayToStringTransformer($entityManager); - } - - /** - * Creates a new TagEntity instance. - * - * @param $name - * - * @return Tag - */ - public function createTag($name) - { - $tag = new Tag(); - $tag->setName($name); - - return $tag; - } - - /** - * Ensures tags are created correctly. + * Ensures that tags are created correctly. */ public function testCreateTheRightAmountOfTags() { $tags = $this->getMockedTransformer()->reverseTransform('Hello, Demo, How'); + $this->assertCount(3, $tags); $this->assertSame('Hello', $tags[0]->getName()); } /** - * Too many commas. + * Ensures that empty tags and errors in the number of commas are + * dealed correctly. */ public function testCreateTheRightAmountOfTagsWithTooManyCommas() { $transformer = $this->getMockedTransformer(); + $this->assertCount(3, $transformer->reverseTransform('Hello, Demo,, How')); $this->assertCount(3, $transformer->reverseTransform('Hello, Demo, How,')); } /** - * Spaces at the end (and beginning) of a world shouldn't matter. + * Ensures that leading/trailing spaces are ignored for tag names. */ public function testTrimNames() { $tags = $this->getMockedTransformer()->reverseTransform(' Hello '); + $this->assertSame('Hello', $tags[0]->getName()); } /** - * Duplicate tags shouldn't create new entities. + * Ensures that duplicated tag names are ignored. */ public function testDuplicateNames() { $tags = $this->getMockedTransformer()->reverseTransform('Hello, Hello, Hello'); + $this->assertCount(1, $tags); } /** - * This test ensure that the transformer uses tag already persisted in the Database. + * Ensures that the transformer uses tags already persisted in the database. */ public function testUsesAlreadyDefinedTags() { @@ -111,13 +76,15 @@ public function testUsesAlreadyDefinedTags() $this->createTag('World'), ]; $tags = $this->getMockedTransformer($persistedTags)->reverseTransform('Hello, World, How, Are, You'); + $this->assertCount(5, $tags); $this->assertSame($persistedTags[0], $tags[0]); $this->assertSame($persistedTags[1], $tags[1]); } /** - * Tags should be transformed into a string. + * Ensures that the transformation from Tag instances to a simple string + * works as expected. */ public function testTransform() { @@ -126,6 +93,50 @@ public function testTransform() $this->createTag('World'), ]; $transformed = $this->getMockedTransformer()->transform($persistedTags); + $this->assertSame('Hello,World', $transformed); } + + /** + * This helper method mocks the real TagArrayToStringTransformer class to + * simplify the tests. See https://phpunit.de/manual/current/en/test-doubles.html + * + * @param array $findByReturnValues The values returned when calling to the findBy() method + * + * @return TagArrayToStringTransformer + */ + private function getMockedTransformer($findByReturnValues = []) + { + $tagRepository = $this->getMockBuilder(EntityRepository::class) + ->disableOriginalConstructor() + ->getMock(); + $tagRepository->expects($this->any()) + ->method('findBy') + ->will($this->returnValue($findByReturnValues)); + + $entityManager = $this + ->getMockBuilder(ObjectManager::class) + ->disableOriginalConstructor() + ->getMock(); + $entityManager->expects($this->any()) + ->method('getRepository') + ->will($this->returnValue($tagRepository)); + + return new TagArrayToStringTransformer($entityManager); + } + + /** + * This helper method creates a Tag instance for the given tag name. + * + * @param string $name + * + * @return Tag + */ + private function createTag($name) + { + $tag = new Tag(); + $tag->setName($name); + + return $tag; + } } From ae2391f6b6d8b9fbfffc1df4181cff526490fd87 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 14 Mar 2017 12:50:46 +0100 Subject: [PATCH 11/11] Fixed code syntax issue reported by Travis CI --- .../Form/DataTransformer/TagArrayToStringTransformerTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php b/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php index 528f64b73..f77b5986c 100644 --- a/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php +++ b/tests/AppBundle/Form/DataTransformer/TagArrayToStringTransformerTest.php @@ -99,9 +99,9 @@ public function testTransform() /** * This helper method mocks the real TagArrayToStringTransformer class to - * simplify the tests. See https://phpunit.de/manual/current/en/test-doubles.html + * simplify the tests. See https://phpunit.de/manual/current/en/test-doubles.html. * - * @param array $findByReturnValues The values returned when calling to the findBy() method + * @param array $findByReturnValues The values returned when calling to the findBy() method * * @return TagArrayToStringTransformer */