5a: Add return values for methods
Provide response values for the `id()` and `bundle()` methods so that we can call them and use the returned values within the assertions.
This commit is contained in:
parent
fd9f9e7e48
commit
7823e56b09
1 changed files with 2 additions and 0 deletions
|
@ -11,6 +11,8 @@ class ArticleWrapperTest extends UnitTestCase {
|
|||
/** @test */
|
||||
public function it_can_return_the_article() {
|
||||
$article = $this->createMock(NodeInterface::class);
|
||||
$article->method('id')->willReturn(5);
|
||||
$article->method('bundle')->willReturn('article');
|
||||
|
||||
$articleWrapper = new ArticleWrapper($article);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue