Use a mock node
This commit is contained in:
parent
e0c59ee91a
commit
89a6f933ec
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace Drupal\Tests\example\Unit;
|
||||
|
||||
use Drupal\node\Entity\Node;
|
||||
use Drupal\node\NodeInterface;
|
||||
use Drupal\Tests\UnitTestCase;
|
||||
|
||||
|
@ -13,10 +12,7 @@ final class PostWrapperTest extends UnitTestCase {
|
|||
|
||||
/** @test */
|
||||
public function it_wraps_a_post(): void {
|
||||
$node = new Node(
|
||||
entity_type: 'post',
|
||||
values: [],
|
||||
);
|
||||
$node = $this->createMock(NodeInterface::class);
|
||||
|
||||
self::assertInstanceOf(NodeInterface::class, $node);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue