Commit bbbfe453 authored by katbailey's avatar katbailey
Browse files

Adding an explanation of the tests

parent 171bc5e5
......@@ -29,8 +29,15 @@ function setUp() {
* Test that services provided by module bundles get registered to the DIC.
function testBundleRegistration() {
// The page callback at /bundle_test checks
// drupal_container()->has('bundle_test_class')
// and if this returns TRUE it outputs a message to this effect. We just
// need to check that the message appears on the page.
$this->assertText(t('The service with id bundle_test_class is available in the DIC'), t('The bundle_test_class service has been registered to the DIC'));
// The event subscriber method in the test class calls drupal_set_message with
// a message saying it has fired. This will fire on every page request so it
// should show up on the front page.
$this->assertText(t('The bundle_test event subscriber fired!'), t('The bundle_test event subscriber fired'));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment