You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _posts/2015-06-30-codeception-2.1-is-here.markdown
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ If you didn't track for the changes in master we will list all the new features
15
15
***Updated to Guzzle 6**. Codeception can now work both with Guzzle v5 and Guzzle v6. PhpBrowser chooses right connector depending on Guzzle version installed.
16
16
***PSR-4**: all support classes moved to `tests/_support` by default. Actors, Helpers, PageObjects, StepObjects, GroupObjects to follow PSR-4 naming style. New `AcceptanceTester`, `FunctionalTester`, `UnitTester` classes are expected to be extended with custom methods. For instance, you can define some common behaviors there. For instance, it is a good idea to place `login` method into the actor class:
17
17
18
-
{{% highlight php %}}
18
+
{% highlight php %}
19
19
<?php
20
20
class AcceptanceTester extends \Codeception\Actor
21
21
{
@@ -30,11 +30,11 @@ class AcceptanceTester extends \Codeception\Actor
30
30
}
31
31
}
32
32
?>
33
-
{{% endhighlight %}}
33
+
{% endhighlight %}
34
34
35
35
***Dependency Injection**: support classes can be injected into tests. Support classes can be injected into each other too.
36
36
37
-
{{% highlight php %}}
37
+
{% highlight php %}
38
38
<?php
39
39
class UserCest
40
40
{
@@ -59,7 +59,7 @@ class UserCest
59
59
}
60
60
}
61
61
?>
62
-
{{% endhighlight %}}
62
+
{% endhighlight %}
63
63
64
64
***Module config simplified**: Modules can be configured in `enabled` section of suite config. Take a look of this sample declaration of Api suite, there is no `config` section inside modules.
65
65
@@ -88,7 +88,7 @@ As you can see, you don't need to specify `PhpBrowser` in `enabled` section, yo
88
88
89
89
***Current** modules, environment, and test name can be received in scenario.
90
90
91
-
{{% highlight php %}}
91
+
{% highlight php %}
92
92
<?php
93
93
$scenario->current('name'); // returns current test name
94
94
$scenario->current('modules'); // returns current modules
@@ -101,7 +101,7 @@ if ($scenario->current('env') == 'firefox') {
***Environment Matrix**: You can run tests combining several environments by separating their names by comma:
@@ -122,11 +122,11 @@ tests/_envs
122
122
123
123
* Cept files should avoid setting their metadata via `$scenario` methods. Instead of calling `$scenario->skip()`, `$scenario->group('firefox')`, etc, it is recommended to set scenario settings with annotations `// @skip`, `// @group firefox`. However, you can use `$scenario->skip` whenever you need to do it on some condition, like
124
124
125
-
{{% highlight php %}}
125
+
{% highlight php %}
126
126
<?php
127
127
if (substr(PHP_OS, 0, 3) == 'Win') $scenario->skip()
0 commit comments