5a: Create a mock article
As this is a unit test, we don’t have access to a database or the service container, so we will need to use a mock. This is enough to pass the `instanceOf` assertion, but the others are failing as those methods are returning `null`.
This commit is contained in:
parent
8d309299ea
commit
fd9f9e7e48
1 changed files with 2 additions and 0 deletions
|
@ -10,6 +10,8 @@ class ArticleWrapperTest extends UnitTestCase {
|
|||
|
||||
/** @test */
|
||||
public function it_can_return_the_article() {
|
||||
$article = $this->createMock(NodeInterface::class);
|
||||
|
||||
$articleWrapper = new ArticleWrapper($article);
|
||||
|
||||
$this->assertInstanceOf(NodeInterface::class, $articleWrapper->getOriginal());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue