Skip to content

Commit c4681ea

Browse files
committed
Add in a test
1 parent 57cec7c commit c4681ea

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/src/Functional/BluecadetUtilitiesTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,22 @@ public function testBasicFunc() {
7777
$this->assertSession()->statusCodeEquals(200);
7878
}
7979

80+
/**
81+
* Test Access to TextFieldSearch form.
82+
*/
83+
public function testTextFieldSearch() {
84+
$session = $this->assertSession();
85+
86+
$this->assertTrue(TRUE);
87+
88+
// Should get a 403 when logged out.
89+
$this->drupalGet('bluecadet_utilities.text_field_search');
90+
$this->assertSession()->statusCodeEquals(403);
91+
92+
// Should get a 200 when logged in as an admin.
93+
$this->drupalLogin($this->adminUser);
94+
$this->drupalGet('bluecadet_utilities.text_field_search');
95+
$this->assertSession()->statusCodeEquals(200);
96+
}
97+
8098
}

0 commit comments

Comments
 (0)