Skip to content

Commit c7cd296

Browse files
committed
updated
1 parent ee95b3e commit c7cd296

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

_posts/2015-06-30-codeception-2.1-is-here.markdown

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ If you didn't track for the changes in master we will list all the new features
1515
* **Updated to Guzzle 6**. Codeception can now work both with Guzzle v5 and Guzzle v6. PhpBrowser chooses right connector depending on Guzzle version installed.
1616
* **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:
1717

18-
{{% highlight php %}}
18+
{% highlight php %}
1919
<?php
2020
class AcceptanceTester extends \Codeception\Actor
2121
{
@@ -30,11 +30,11 @@ class AcceptanceTester extends \Codeception\Actor
3030
}
3131
}
3232
?>
33-
{{% endhighlight %}}
33+
{% endhighlight %}
3434

3535
* **Dependency Injection**: support classes can be injected into tests. Support classes can be injected into each other too.
3636

37-
{{% highlight php %}}
37+
{% highlight php %}
3838
<?php
3939
class UserCest
4040
{
@@ -59,7 +59,7 @@ class UserCest
5959
}
6060
}
6161
?>
62-
{{% endhighlight %}}
62+
{% endhighlight %}
6363

6464
* **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.
6565

@@ -88,7 +88,7 @@ As you can see, you don't need to specify `PhpBrowser` in `enabled` section, yo
8888

8989
* **Current** modules, environment, and test name can be received in scenario.
9090

91-
{{% highlight php %}}
91+
{% highlight php %}
9292
<?php
9393
$scenario->current('name'); // returns current test name
9494
$scenario->current('modules'); // returns current modules
@@ -101,7 +101,7 @@ if ($scenario->current('env') == 'firefox') {
101101
// naming screenshot
102102
$I->makeScreenshot($scenario->current('name').'_screenshot.png');
103103
?>
104-
{{% endhighlight %}}
104+
{% endhighlight %}
105105

106106

107107
* **Environment Matrix**: You can run tests combining several environments by separating their names by comma:
@@ -122,11 +122,11 @@ tests/_envs
122122

123123
* 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
124124

125-
{{% highlight php %}}
125+
{% highlight php %}
126126
<?php
127127
if (substr(PHP_OS, 0, 3) == 'Win') $scenario->skip()
128128
?>
129-
{{% endhighlight %}}
129+
{% endhighlight %}
130130

131131
* Improved HTML reports
132132
![html report](/images/html-report.png)

0 commit comments

Comments
 (0)