File tree 11 files changed +128
-58
lines changed
11 files changed +128
-58
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+
4
+ /**
5
+ * Inherited Methods
6
+ * @method void wantToTest($text)
7
+ * @method void wantTo($text)
8
+ * @method void execute($callable)
9
+ * @method void expectTo($prediction)
10
+ * @method void expect($prediction)
11
+ * @method void amGoingTo($argumentation)
12
+ * @method void am($role)
13
+ * @method void lookForwardTo($achieveValue)
14
+ * @method void comment($description)
15
+ * @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL)
16
+ *
17
+ * @SuppressWarnings(PHPMD)
18
+ */
19
+ class AcceptanceTester extends \Codeception \Actor
20
+ {
21
+ use _generated \AcceptanceTesterActions;
22
+
23
+ /**
24
+ * Define custom actions here
25
+ */
26
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+
4
+ /**
5
+ * Inherited Methods
6
+ * @method void wantToTest($text)
7
+ * @method void wantTo($text)
8
+ * @method void execute($callable)
9
+ * @method void expectTo($prediction)
10
+ * @method void expect($prediction)
11
+ * @method void amGoingTo($argumentation)
12
+ * @method void am($role)
13
+ * @method void lookForwardTo($achieveValue)
14
+ * @method void comment($description)
15
+ * @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL)
16
+ *
17
+ * @SuppressWarnings(PHPMD)
18
+ */
19
+ class FunctionalTester extends \Codeception \Actor
20
+ {
21
+ use _generated \FunctionalTesterActions;
22
+
23
+ /**
24
+ * Define custom actions here
25
+ */
26
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+
4
+ /**
5
+ * Inherited Methods
6
+ * @method void wantToTest($text)
7
+ * @method void wantTo($text)
8
+ * @method void execute($callable)
9
+ * @method void expectTo($prediction)
10
+ * @method void expect($prediction)
11
+ * @method void amGoingTo($argumentation)
12
+ * @method void am($role)
13
+ * @method void lookForwardTo($achieveValue)
14
+ * @method void comment($description)
15
+ * @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL)
16
+ *
17
+ * @SuppressWarnings(PHPMD)
18
+ */
19
+ class UnitTester extends \Codeception \Actor
20
+ {
21
+ use _generated \UnitTesterActions;
22
+
23
+ /**
24
+ * Define custom actions here
25
+ */
26
+ }
Original file line number Diff line number Diff line change
1
+ *
2
+ ! .gitignore
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ class_name: AcceptanceTester
12
12
modules :
13
13
enabled :
14
14
- PhpBrowser
15
+ # - Yii2:
16
+ # configFile: '/codeception/config/acceptance.php'
15
17
# you can use WebDriver instead of PhpBrowser to test javascript and ajax.
16
18
# This will require you to install selenium. See http://codeception.com/docs/03-AcceptanceTests#selenium-webdriver
17
19
# "restart" option is used by the WebDriver to start each time per test-file new session and cookies,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ class AboutCest
4
+ {
5
+ public function ensureThatAboutWorks (AcceptanceTester $ I )
6
+ {
7
+ //$I->amOnPage(['site/about']);
8
+ $ I ->amOnPage ('index.php?r=site%2Fabout ' );
9
+ $ I ->see ('About ' , 'h1 ' );
10
+ }
11
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ class HomeCest
4
+ {
5
+ public function ensureThatHomePageWorks (AcceptanceTester $ I )
6
+ {
7
+ //$I->amOnPage(Yii::$app->homeUrl);
8
+ $ I ->amOnPage ('index.php?r=site%2Findex ' );
9
+ $ I ->see ('My Company ' );
10
+
11
+ $ I ->seeLink ('About ' );
12
+ $ I ->click ('About ' );
13
+
14
+ $ I ->see ('This is the About page. ' );
15
+ }
16
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ class LoginCest
4
+ {
5
+ public function ensureThatLoginWorks (AcceptanceTester $ I )
6
+ {
7
+ //$I->amOnPage(['site/login']);
8
+ $ I ->amOnPage ('index.php?r=site%2Flogin ' );
9
+ $ I ->see ('Login ' , 'h1 ' );
10
+
11
+ $ I ->amGoingTo ('try to login with correct credentials ' );
12
+ $ I ->fillField ('input[name="LoginForm[username]"] ' , 'admin ' );
13
+ $ I ->fillField ('input[name="LoginForm[password]"] ' , 'admin ' );
14
+ $ I ->click ('login-button ' );
15
+
16
+ $ I ->expectTo ('see user info ' );
17
+ $ I ->see ('Logout (admin) ' );
18
+ }
19
+ }
You can’t perform that action at this time.
0 commit comments