4e: Add getAll() method
This commit is contained in:
parent
f194015f30
commit
f38f21fdc8
|
@ -4,4 +4,8 @@ namespace Drupal\my_module\Repository;
|
|||
|
||||
class ArticleRepository {
|
||||
|
||||
public function getAll(): array {
|
||||
return [];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ class ArticleRepositoryTest extends EntityKernelTestBase {
|
|||
/** @test */
|
||||
public function it_returns_blog_posts() {
|
||||
$repository = $this->container->get(ArticleRepository::class);
|
||||
$articles = $repository->getAll();
|
||||
|
||||
$this->assertCount(1, $articles);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue