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:
Oliver Davies 2020-03-19 21:53:46 +00:00
parent fd9f9e7e48
commit 7823e56b09

View file

@ -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);