summaryrefslogtreecommitdiff
path: root/modules/bhavika/admission_program/tests
diff options
context:
space:
mode:
Diffstat (limited to 'modules/bhavika/admission_program/tests')
-rw-r--r--modules/bhavika/admission_program/tests/Controller/AdmissionProgramControllerTest.php39
-rw-r--r--modules/bhavika/admission_program/tests/src/Functional/LoadTest.php46
2 files changed, 85 insertions, 0 deletions
diff --git a/modules/bhavika/admission_program/tests/Controller/AdmissionProgramControllerTest.php b/modules/bhavika/admission_program/tests/Controller/AdmissionProgramControllerTest.php
new file mode 100644
index 0000000..3f828c9
--- /dev/null
+++ b/modules/bhavika/admission_program/tests/Controller/AdmissionProgramControllerTest.php
@@ -0,0 +1,39 @@
+<?php
+
+namespace Drupal\admission_program\Tests;
+
+use Drupal\simpletest\WebTestBase;
+
+/**
+ * Provides automated tests for the admission_program module.
+ */
+class AdmissionProgramControllerTest extends WebTestBase {
+
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function getInfo() {
+ return [
+ 'name' => "admission_program AdmissionProgramController's controller functionality",
+ 'description' => 'Test Unit for module admission_program and controller AdmissionProgramController.',
+ 'group' => 'Other',
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setUp() {
+ parent::setUp();
+ }
+
+ /**
+ * Tests admission_program functionality.
+ */
+ public function testAdmissionProgramController() {
+ // Check that the basic functions of module admission_program.
+ $this->assertEquals(TRUE, TRUE, 'Test Unit Generated via Drupal Console.');
+ }
+
+}
diff --git a/modules/bhavika/admission_program/tests/src/Functional/LoadTest.php b/modules/bhavika/admission_program/tests/src/Functional/LoadTest.php
new file mode 100644
index 0000000..ff2491f
--- /dev/null
+++ b/modules/bhavika/admission_program/tests/src/Functional/LoadTest.php
@@ -0,0 +1,46 @@
+<?php
+
+namespace Drupal\Tests\admission_program\Functional;
+
+use Drupal\Core\Url;
+use Drupal\Tests\BrowserTestBase;
+
+/**
+ * Simple test to ensure that main page loads with module enabled.
+ *
+ * @group admission_program
+ */
+class LoadTest extends BrowserTestBase {
+
+ /**
+ * Modules to enable.
+ *
+ * @var array
+ */
+ public static $modules = ['admission_program'];
+
+ /**
+ * A user with permission to administer site configuration.
+ *
+ * @var \Drupal\user\UserInterface
+ */
+ protected $user;
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function setUp() {
+ parent::setUp();
+ $this->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('<front>'));
+ $this->assertSession()->statusCodeEquals(200);
+ }
+
+}