Improved public API in Tag entity, avoiding anemic model

This commit is contained in:
Alejandro Celaya
2018-10-28 14:38:43 +01:00
parent f7ceeff05a
commit 084b1169d7
11 changed files with 23 additions and 25 deletions

View File

@@ -11,10 +11,9 @@ class TagTest extends TestCase
/**
* @test
*/
public function jsonSerializationOfTagsReturnsItsName()
public function jsonSerializationOfTagsReturnsItsStringRepresentation()
{
$tag = new Tag();
$tag->setName('This is my name');
$this->assertEquals($tag->getName(), $tag->jsonSerialize());
$tag = new Tag('This is my name');
$this->assertEquals((string) $tag, $tag->jsonSerialize());
}
}