5b: Check that it returns the post title
> Drupal\Tests\my_module\Unit\Entity\PostTest::it_returns_the_title > Error: Call to undefined method Drupal\my_module\Entity\Post::getTitle()
This commit is contained in:
parent
cbd0176c37
commit
07ad4dc2b1
|
@ -2,8 +2,16 @@
|
|||
|
||||
namespace Drupal\Tests\my_module\Unit\Entity;
|
||||
|
||||
use Drupal\my_module\Entity\Post;
|
||||
use Drupal\Tests\UnitTestCase;
|
||||
|
||||
class PostTest extends UnitTestCase {
|
||||
|
||||
/** @test */
|
||||
public function it_returns_the_title() {
|
||||
$post = new Post();
|
||||
|
||||
$this->assertSame('Test post', $post->getTitle());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue