4e: Add getAll() method

This commit is contained in:
Oliver Davies 2020-11-14 09:07:23 +00:00
parent f194015f30
commit f38f21fdc8
2 changed files with 5 additions and 0 deletions

View file

@ -4,4 +4,8 @@ namespace Drupal\my_module\Repository;
class ArticleRepository {
public function getAll(): array {
return [];
}
}

View file

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