コード例 #1
0
ファイル: TestsForMink.php プロジェクト: nike-17/Codeception
 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');
 }
コード例 #2
0
ファイル: TestsForMink.php プロジェクト: pfz/codeception
 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');
 }
コード例 #3
0
 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');
 }
コード例 #4
0
 public function testDontSeeInInsideFails()
 {
     $this->shouldFail();
     $this->module->amOnPage('/info');
     $this->module->dontSee('interesting', 'p');
 }