5d: Ensure the label will return the title
This commit is contained in:
parent
bd68420fc1
commit
8f8218260b
|
@ -12,6 +12,10 @@ class PostTest extends UnitTestCase {
|
||||||
public function it_returns_the_title() {
|
public function it_returns_the_title() {
|
||||||
$node = $this->createMock(NodeInterface::class);
|
$node = $this->createMock(NodeInterface::class);
|
||||||
|
|
||||||
|
$node->expects($this->once())
|
||||||
|
->method('label')
|
||||||
|
->willReturn('Test post');
|
||||||
|
|
||||||
$post = new Post($node);
|
$post = new Post($node);
|
||||||
|
|
||||||
$this->assertSame('Test post', $post->getTitle());
|
$this->assertSame('Test post', $post->getTitle());
|
||||||
|
|
Loading…
Reference in a new issue