REDROOM
PHP 8.1.33
Path:
Logout
Edit File
Size: 1.37 KB
Close
/home/jambtst2015/public_html/protected/tests/functional/SiteTest.php
Text
Base64
<?php class SiteTest extends WebTestCase { public function testIndex() { $this->open(''); $this->assertTextPresent('Welcome'); } public function testContact() { $this->open('?r=site/contact'); $this->assertTextPresent('Contact Us'); $this->assertElementPresent('name=ContactForm[name]'); $this->type('name=ContactForm[name]','tester'); $this->type('name=ContactForm[email]','tester@example.com'); $this->type('name=ContactForm[subject]','test subject'); $this->click("//input[@value='Submit']"); $this->waitForTextPresent('Body cannot be blank.'); } public function testLoginLogout() { $this->open(''); // ensure the user is logged out if($this->isTextPresent('Logout')) $this->clickAndWait('link=Logout (demo)'); // test login process, including validation $this->clickAndWait('link=Login'); $this->assertElementPresent('name=LoginForm[username]'); $this->type('name=LoginForm[username]','demo'); $this->click("//input[@value='Login']"); $this->waitForTextPresent('Password cannot be blank.'); $this->type('name=LoginForm[password]','demo'); $this->clickAndWait("//input[@value='Login']"); $this->assertTextNotPresent('Password cannot be blank.'); $this->assertTextPresent('Logout'); // test logout process $this->assertTextNotPresent('Login'); $this->clickAndWait('link=Logout (demo)'); $this->assertTextPresent('Login'); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 2
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
error_log
3.02 KB
lrw-r--r--
2025-11-03 14:05:25
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
SiteTest.php
1.37 KB
lrw-r--r--
2024-11-22 17:53:11
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).