From 565af64fc81211897625be2b000a28c910174edb Mon Sep 17 00:00:00 2001 From: Bhavika-keswani Date: Tue, 2 Jul 2019 12:41:45 +0530 Subject: Custom modules added --- .../tests/Controller/CompanyControllerTest.php | 39 ++++++++++++++++++ .../company/tests/src/Functional/LoadTest.php | 46 ++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 modules/bhavika/company/tests/Controller/CompanyControllerTest.php create mode 100644 modules/bhavika/company/tests/src/Functional/LoadTest.php (limited to 'modules/bhavika/company/tests') diff --git a/modules/bhavika/company/tests/Controller/CompanyControllerTest.php b/modules/bhavika/company/tests/Controller/CompanyControllerTest.php new file mode 100644 index 0000000..66debed --- /dev/null +++ b/modules/bhavika/company/tests/Controller/CompanyControllerTest.php @@ -0,0 +1,39 @@ + "company CompanyController's controller functionality", + 'description' => 'Test Unit for module company and controller CompanyController.', + 'group' => 'Other', + ]; + } + + /** + * {@inheritdoc} + */ + public function setUp() { + parent::setUp(); + } + + /** + * Tests company functionality. + */ + public function testCompanyController() { + // Check that the basic functions of module company. + $this->assertEquals(TRUE, TRUE, 'Test Unit Generated via Drupal Console.'); + } + +} diff --git a/modules/bhavika/company/tests/src/Functional/LoadTest.php b/modules/bhavika/company/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..15e82ca --- /dev/null +++ b/modules/bhavika/company/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); + } + +} -- cgit