public function testSee() { $this->module->amOnPage('/'); $this->module->see('Welcome to test app!'); $this->module->amOnPage('/'); $this->module->see('Welcome to test app!', 'h1'); $this->module->amOnPage('/info'); $this->module->see('valuable', 'p'); $this->module->dontSee('Welcome'); $this->module->dontSee('valuable', 'h1'); }
public function testSee() { $this->module->amOnPage('/'); $this->module->see('Welcome to test app!'); $this->module->amOnPage('/'); $this->module->see('Welcome to test app!', 'h1'); $this->module->amOnPage('/info'); $this->module->see('valuable', 'p'); $this->module->see('valuable', 'descendant-or-self::body/p'); $this->module->dontSee('Welcome'); $this->module->dontSee('valuable', 'h1'); }
public function testHttpAuth() { $this->module->amOnPage('/auth'); $this->module->seeResponseCodeIs(401); $this->module->see('Unauthorized'); $this->module->amHttpAuthenticated('davert', 'password'); $this->module->amOnPage('/auth'); $this->module->dontSee('Unauthorized'); $this->module->see("Welcome, davert"); $this->module->amHttpAuthenticated('davert', '123456'); $this->module->amOnPage('/auth'); $this->module->see('Forbidden'); }
public function testDontSeeInInsideFails() { $this->shouldFail(); $this->module->amOnPage('/info'); $this->module->dontSee('interesting', 'p'); }