commit 03846a27f764ca7d7f8df9f2269cba9bd32d79d5 Author: naomi Date: Sun Apr 29 09:22:16 2018 +0200 Generated opencase and opencase_entities modules diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..dae8849 --- /dev/null +++ b/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/opencase", + "type": "drupal-module", + "description": "Simple Case Management", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/opencase", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/opencase", + "source": "http://cgit.drupalcode.org/opencase" + }, + "require": { } +} diff --git a/modules/opencase_entities/composer.json b/modules/opencase_entities/composer.json new file mode 100644 index 0000000..587cd98 --- /dev/null +++ b/modules/opencase_entities/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/opencase_entities", + "type": "drupal-module", + "description": "Entities used in OpenCase", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/opencase_entities", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/opencase_entities", + "source": "http://cgit.drupalcode.org/opencase_entities" + }, + "require": { } +} diff --git a/modules/opencase_entities/opencase_entities.info.yml b/modules/opencase_entities/opencase_entities.info.yml new file mode 100644 index 0000000..fbe7ce2 --- /dev/null +++ b/modules/opencase_entities/opencase_entities.info.yml @@ -0,0 +1,5 @@ +name: 'OpenCase Entities' +type: module +description: 'Entities used in OpenCase' +core: 8.x +package: 'OpenCase' diff --git a/modules/opencase_entities/opencase_entities.module b/modules/opencase_entities/opencase_entities.module new file mode 100644 index 0000000..db50907 --- /dev/null +++ b/modules/opencase_entities/opencase_entities.module @@ -0,0 +1,35 @@ +' . t('About') . ''; + $output .= '

' . t('Entities used in OpenCase') . '

'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function opencase_entities_theme() { + return [ + 'opencase_entities' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/opencase_entities/templates/opencase-entities.html.twig b/modules/opencase_entities/templates/opencase-entities.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/opencase_entities/templates/opencase-entities.html.twig @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/opencase_entities/tests/src/Functional/LoadTest.php b/modules/opencase_entities/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..2669263 --- /dev/null +++ b/modules/opencase_entities/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +user = $this->drupalCreateUser(['administer site configuration']); + $this->drupalLogin($this->user); + } + + /** + * Tests that the home page loads with a 200 response. + */ + public function testLoad() { + $this->drupalGet(Url::fromRoute('')); + $this->assertSession()->statusCodeEquals(200); + } + +} diff --git a/opencase.info.yml b/opencase.info.yml new file mode 100644 index 0000000..7bb70aa --- /dev/null +++ b/opencase.info.yml @@ -0,0 +1,5 @@ +name: 'OpenCase' +type: module +description: 'Simple Case Management' +core: 8.x +package: 'OpenCase' diff --git a/opencase.module b/opencase.module new file mode 100644 index 0000000..c3136db --- /dev/null +++ b/opencase.module @@ -0,0 +1,35 @@ +' . t('About') . ''; + $output .= '

' . t('Simple Case Management') . '

'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function opencase_theme() { + return [ + 'opencase' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/templates/opencase.html.twig b/templates/opencase.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/templates/opencase.html.twig @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/src/Functional/LoadTest.php b/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..87ac8af --- /dev/null +++ b/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +user = $this->drupalCreateUser(['administer site configuration']); + $this->drupalLogin($this->user); + } + + /** + * Tests that the home page loads with a 200 response. + */ + public function testLoad() { + $this->drupalGet(Url::fromRoute('')); + $this->assertSession()->statusCodeEquals(200); + } + +}