/
ApacheWorkerCest.php
37 lines (32 loc) · 1.01 KB
/
ApacheWorkerCest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
class ApacheWorkerCest {
public function _before(AcceptanceTester $I) {
}
// tests
public function tryToGotoFortunes(AcceptanceTester $I) {
$I->amOnPage ( "/fortunes" );
$I->seeElement ( 'body' );
$I->see ( 'Fortune: No such file or directory', [ 'css' => 'body' ] );
$I->see ( "A computer scientist is someone who fixes things that aren't broken.", [ 'css' => 'body' ] );
$I->see ( '<script>alert("This should not be displayed in a browser alert box.");</script>', [ 'css' => 'body' ] );
$I->see ( 'Feature: A bug with seniority.', [ 'css' => 'body' ] );
}
// tests
public function tryToGotoDb(AcceptanceTester $I) {
$I->amOnPage ( "/db" );
$I->see ( 'id' );
$I->see ( 'randomNumber' );
}
// tests
public function tryToGotoQuery(AcceptanceTester $I) {
$I->amOnPage ( "/db/query/2" );
$I->see ( 'id' );
$I->see ( 'randomNumber' );
}
// tests
public function tryToGotoUpdate(AcceptanceTester $I) {
$I->amOnPage ( "/db/update/2" );
$I->see ( 'id' );
$I->see ( 'randomNumber' );
}
}