Commit graph

17 commits

Author SHA1 Message Date
f492921c8d 4f: Enable the node module
Enable the node module within the test.

This returns as 0 articles are returned, but 3 are expected in the
assertion.
2020-03-25 12:31:28 +00:00
016512bf1b 4f: Enable autowiring
Enable autowiring so that the entity type manager is injected into the
ArticleRepository service.

This fails because the 'node' entity type doesn’t exist.
2020-03-25 12:31:28 +00:00
dcace271a2 4f: Build up the getAll() method
Inject the entity type manager service into the ArticleRepository, and
use it to load and return all nodes.

This fails as not enough arguments are passed to the article repository
service from the container.
2020-03-25 12:31:28 +00:00
8adcf2d8f6 4e: Add the getAll() method
Add the `getAll()` method to the ArticleRepository, ensuring that it
returns an array.

This returns as 0 articles are returned, but 3 are expected in the
assertion.
2020-03-25 12:31:28 +00:00
54b306844f 4d: Add the ArticleRepository
Create the `ArticleRepository` class and add it as a service.

This fails as there is no `getAll()` method on the class.
2020-03-25 12:31:28 +00:00
0c518d3d37 4a: Ensure that only articles are returned
Start adding a kernel test that retrieves article nodes from an
`ArticleRepository` and ensures that only articles are returned.

This fails due to a non-existent service.
2020-03-25 12:31:28 +00:00
23287fc0fd 3e: Add page text
Replace the empty render array with one that returns the expected text.
2020-03-25 12:31:28 +00:00
165f159073 3e: Add more assertions
Add more assertions to ensure that the correct page title is returned as
well as some text on the page.

This fails as the expected test is not returned.
2020-03-25 12:31:28 +00:00
e8bfcb353b 3d: Add BlogPageController
Add the BlogPageController that is referenced within
`my_module.routing.yml`.

We will need to return a render array, but for now let’s return an empty
array.

The test now passes as we are getting the expected response code.
2020-03-25 12:31:28 +00:00
5fe37b439b 3c: Enable the node module
Enable the node module within the test to add the `access content`
permission.

This fails, and returns a 500 response code rather than the expected 200
response code.
2020-03-25 12:31:28 +00:00
749ec4f829 3b: Add blog page route
Add a `my_module.routing.yml` file that adds the missing route for
`/blog`.

This fails, and returns a 403 response code rather than the expected 200
response code.
2020-03-25 12:31:28 +00:00
aabc1aac1b 3a: Add blog page functional test
Add the new `BlogPageTest` functional test to ensure that anonymous
users can access the `/blog` page.

This fails, and returns a 404 response code rather than the expected 200
response code.
2020-03-25 12:31:28 +00:00
1941bdf9ba 2b: Admin page access for admin users
Ensure that users with the `access administration pages` permission can
access the site’s administration pages.
2020-03-25 12:31:28 +00:00
1f6a90624f 2a: Admin page access for anonymous users
Ensure that anonymous users cannot access the site’s administration
pages.
2020-03-25 12:31:28 +00:00
300c572080 1d: Add first functional test
Ensure that anonymous users can view the site’s front page.
2020-03-25 12:31:28 +00:00
b3cddb036b 1b: Add my_module.info.yml
Add the my_module.info.yml file so that the module can be enabled.
2020-03-25 12:31:28 +00:00
5adc4f6a10 init 2020-03-25 12:31:28 +00:00