Mock EntityTypeManager
> OK, but incomplete, skipped, or risky tests! > Tests: 1, Assertions: 0, Risky: 1.
This commit is contained in:
parent
bad5ba5905
commit
6e00df9ccc
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace Drupal\Tests\example\Unit;
|
namespace Drupal\Tests\example\Unit;
|
||||||
|
|
||||||
|
use Drupal\Core\Entity\EntityTypeManagerInterface;
|
||||||
use Drupal\example\Repository\PostNodeRepository;
|
use Drupal\example\Repository\PostNodeRepository;
|
||||||
use Drupal\Tests\UnitTestCase;
|
use Drupal\Tests\UnitTestCase;
|
||||||
|
|
||||||
|
@ -13,7 +14,7 @@ final class PostNodeRepositoryUnitTest extends UnitTestCase {
|
||||||
/** @test */
|
/** @test */
|
||||||
public function it_returns_posts(): void {
|
public function it_returns_posts(): void {
|
||||||
$repository = new PostNodeRepository(
|
$repository = new PostNodeRepository(
|
||||||
new EntityTypeManager(),
|
$this->createMock(EntityTypeManagerInterface::class),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue