File tree 15 files changed +163
-141
lines changed
15 files changed +163
-141
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ *
2
+ ! .gitignore
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
+ /**
4
+ * Class ContactCest
5
+ */
6
+ class ContactCest
7
+ {
8
+ public function _before (\AcceptanceTester $ I )
9
+ {
10
+ $ I ->amOnPage ('index-test.php?r=site%2Fcontact ' );
11
+ }
12
+
13
+ public function contactPageWorks (AcceptanceTester $ I )
14
+ {
15
+ $ I ->wantTo ('ensure that contact page works ' );
16
+ $ I ->see ('Contact ' , 'h1 ' );
17
+ }
18
+
19
+ public function contactFormCanBeSubmitted (AcceptanceTester $ I )
20
+ {
21
+ $ I ->amGoingTo ('submit contact form with correct data ' );
22
+ $ I ->fillField ('#contactform-name ' , 'tester ' );
23
+ $ I ->fillField ('#contactform-email ' , 'tester@example.com ' );
24
+ $ I ->fillField ('#contactform-subject ' , 'test subject ' );
25
+ $ I ->fillField ('#contactform-body ' , 'test content ' );
26
+ $ I ->fillField ('#contactform-verifycode ' , 'testme ' );
27
+
28
+ $ I ->click ('contact-button ' );
29
+
30
+ $ I ->dontSeeElement ('#contact-form ' );
31
+ $ I ->see ('Thank you for contacting us. We will respond to you as soon as possible. ' );
32
+ }
33
+ }
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