Re-add syntax highlighting to daily emails and

...ATDC lessons
This commit is contained in:
Oliver Davies 2024-02-18 01:35:59 +00:00
parent 0d9bb37503
commit 5fbf48d9ac
48 changed files with 186 additions and 165 deletions

View file

@ -10,7 +10,7 @@ I cloned a fresh version of my [Docker Examples repository](https://github.com/o
I ran `mkdir -p web/modules/custom/example/tests/src/Functional` to create the directory structure that I needed, and then `touch web/modules/custom/example/tests/src/Functional/ExampleTest.php` to create a new test file and populated it with some initial code:
```php
```language-php
<?php
namespace Drupal\Tests\example\Functional;
@ -27,7 +27,7 @@ class ExampleTest extends BrowserTestBase {
For the simplest test, I decided to test some existing Drupal core functionality - that an anonymous user can view the front page:
```php
```language-php
/** @test */
public function the_front_page_loads_for_anonymous_users() {
$this->drupalGet('<front>');
@ -42,7 +42,7 @@ As this is existing functionalty, the test passes. I can change either the path
With the first test working, it's easy to add more for other functionality, such as whether different users should be able to access administration pages:
```php
```language-php
/** @test */
public function the_admin_page_is_not_accessible_to_anonymous_users() {
$this->drupalGet('admin');