docs: DrupalCon updates
This commit is contained in:
parent
6cf7d0fee4
commit
675e89e9d1
28 changed files with 1240 additions and 144 deletions
41
test-driven-drupal/code/3.txt
Normal file
41
test-driven-drupal/code/3.txt
Normal file
|
@ -0,0 +1,41 @@
|
|||
// tests/src/Functional/BlogPageTest.php
|
||||
|
||||
/** @test */
|
||||
public function it_loads_the_blog_page(): void {
|
||||
$this->drupalGet('/blog');
|
||||
|
||||
$this->assertSession()->statusCodeEquals(200);
|
||||
}
|
||||
// end test
|
||||
|
||||
// start output
|
||||
E 1 / 1 (100%)
|
||||
|
||||
Time: 00:01.379, Memory: 6.00 MB
|
||||
|
||||
There was 1 error:
|
||||
|
||||
1) Drupal\Tests\drupalcon\Functional\BlogPageTest::it_loads_the_blog_page
|
||||
Behat\Mink\Exception\ExpectationException:
|
||||
Current response status code is 404, but 200 expected.
|
||||
|
||||
/app/vendor/behat/mink/src/WebAssert.php:794
|
||||
/app/vendor/behat/mink/src/WebAssert.php:130
|
||||
/app/web/modules/custom/drupalcon/tests/src/BlogPageTest.php:16
|
||||
/app/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
|
||||
|
||||
ERRORS!
|
||||
Tests: 1, Assertions: 2, Errors: 1.
|
||||
// end output
|
||||
|
||||
// start routing
|
||||
# drupalcon.routing.yml
|
||||
|
||||
blog.page:
|
||||
path: /blog
|
||||
defaults:
|
||||
_controller: Drupal\drupalcon\Controller\BlogPageController
|
||||
_title: Blog
|
||||
requirements:
|
||||
_permission: access content
|
||||
// end routing
|
Loading…
Add table
Add a link
Reference in a new issue