Skip to content

Commit 7b613aa

Browse files
committed
auto updated documentation
1 parent 42e263d commit 7b613aa

26 files changed

+1445
-123
lines changed

_includes/modules.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<li><a href="/docs/modules/AMQP">AMQP</a></li><li><a href="/docs/modules/Phalcon2">Phalcon2</a></li><li><a href="/docs/modules/Asserts">Asserts</a></li><li><a href="/docs/modules/PhpBrowser">PhpBrowser</a></li><li><a href="/docs/modules/Cli">Cli</a></li><li><a href="/docs/modules/Queue">Queue</a></li><li><a href="/docs/modules/Db">Db</a></li><li><a href="/docs/modules/REST">REST</a></li><li><a href="/docs/modules/Dbh">Dbh</a></li><li><a href="/docs/modules/Redis">Redis</a></li><li><a href="/docs/modules/Doctrine2">Doctrine2</a></li><li><a href="/docs/modules/SOAP">SOAP</a></li><li><a href="/docs/modules/FTP">FTP</a></li><li><a href="/docs/modules/Sequence">Sequence</a></li><li><a href="/docs/modules/Facebook">Facebook</a></li><li><a href="/docs/modules/Silex">Silex</a></li><li><a href="/docs/modules/Filesystem">Filesystem</a></li><li><a href="/docs/modules/Symfony2">Symfony2</a></li><li><a href="/docs/modules/Laravel4">Laravel4</a></li><li><a href="/docs/modules/WebDriver">WebDriver</a></li><li><a href="/docs/modules/Laravel5">Laravel5</a></li><li><a href="/docs/modules/XMLRPC">XMLRPC</a></li><li><a href="/docs/modules/Lumen">Lumen</a></li><li><a href="/docs/modules/Yii1">Yii1</a></li><li><a href="/docs/modules/Memcache">Memcache</a></li><li><a href="/docs/modules/Yii2">Yii2</a></li><li><a href="/docs/modules/MongoDb">MongoDb</a></li><li><a href="/docs/modules/ZF1">ZF1</a></li><li><a href="/docs/modules/Phalcon1">Phalcon1</a></li><li><a href="/docs/modules/ZF2">ZF2</a></li>
1+
<li><a href="/docs/modules/AMQP">AMQP</a></li><li><a href="/docs/modules/PhpBrowser">PhpBrowser</a></li><li><a href="/docs/modules/Asserts">Asserts</a></li><li><a href="/docs/modules/Queue">Queue</a></li><li><a href="/docs/modules/Cli">Cli</a></li><li><a href="/docs/modules/REST">REST</a></li><li><a href="/docs/modules/Db">Db</a></li><li><a href="/docs/modules/Redis">Redis</a></li><li><a href="/docs/modules/Dbh">Dbh</a></li><li><a href="/docs/modules/SOAP">SOAP</a></li><li><a href="/docs/modules/Doctrine2">Doctrine2</a></li><li><a href="/docs/modules/Sequence">Sequence</a></li><li><a href="/docs/modules/FTP">FTP</a></li><li><a href="/docs/modules/Silex">Silex</a></li><li><a href="/docs/modules/Facebook">Facebook</a></li><li><a href="/docs/modules/Symfony2">Symfony2</a></li><li><a href="/docs/modules/Filesystem">Filesystem</a></li><li><a href="/docs/modules/WebDriver">WebDriver</a></li><li><a href="/docs/modules/Laravel4">Laravel4</a></li><li><a href="/docs/modules/XMLRPC">XMLRPC</a></li><li><a href="/docs/modules/Laravel5">Laravel5</a></li><li><a href="/docs/modules/Yii1">Yii1</a></li><li><a href="/docs/modules/Lumen">Lumen</a></li><li><a href="/docs/modules/Yii2">Yii2</a></li><li><a href="/docs/modules/Memcache">Memcache</a></li><li><a href="/docs/modules/ZF1">ZF1</a></li><li><a href="/docs/modules/MongoDb">MongoDb</a></li><li><a href="/docs/modules/ZF2">ZF2</a></li><li><a href="/docs/modules/Phalcon1">Phalcon1</a></li><li><a href="/docs/modules/ZendExpressive">ZendExpressive</a></li><li><a href="/docs/modules/Phalcon2">Phalcon2</a></li>

changelog.markdown

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,37 @@ title: Codeception Changelog
77

88
# Changelog
99

10+
#### 2.1.5
11+
12+
* **PHP7 support**
13+
* **Symfony3 support**
14+
* <strong>[ZendExpressive]</strong> **module added** by <strong><a href="https://github.com/Naktibalda">@Naktibalda</a></strong>
15+
* <strong>[Frameworks]</strong> **Internal Domains**: Framework modules now throw an `ExternalUrlException` when a test tries to open a URL that is not handled by the framework, i.e. an external URL. See <a href="https://github.com/Codeception/Codeception/issues/2396">#2396</a>
16+
* Syntax check for tests. If PHP7 is used, `ParseException` handles syntax error, otherwise linting happens with `php -l`. <strong><a href="https://github.com/davertmik">@davertmik</a></strong>
17+
* Fixed Cest generation to not include "use" statements if no namespaces set
18+
* <strong>[REST]</strong> Modified JsonArray::sequentialArrayIntersect to return complete matches only by <strong><a href="https://github.com/Naktibalda">@Naktibalda</a></strong>. Fixes <a href="https://github.com/Codeception/Codeception/issues/2635">#2635</a>
19+
* <strong>[REST]</strong> Fixes validation of several types with filters. See <a href="https://github.com/Codeception/Codeception/issues/2581">#2581</a> By <strong><a href="https://github.com/davertmik">@davertmik</a></strong>
20+
* <strong>[REST]</strong> JsonType improved URL filter to use `filter_var($value, FILTER_VALIDATE_URL)`
21+
* <strong>[REST]</strong> JsonType to support collections: all items in an array will be validates against JsonType. By <strong><a href="https://github.com/davertmik">@davertmik</a></strong>
22+
* <strong>[REST]</strong> Various fixes to JsonType: <a href="https://github.com/Codeception/Codeception/issues/2555">#2555</a> <a href="https://github.com/Codeception/Codeception/issues/2548">#2548</a> <a href="https://github.com/Codeception/Codeception/issues/2542">#2542</a>
23+
* <strong>[REST]</strong> Hides binary request data in debug by <strong><a href="https://github.com/codemedic">@codemedic</a></strong>. Fixed <a href="https://github.com/Codeception/Codeception/issues/1884">#1884</a>, See <a href="https://github.com/Codeception/Codeception/issues/2552">#2552</a>
24+
* <strong>[WebDriver]</strong> Allow `appendField` to work with content editable div by <strong><a href="https://github.com/nsanden">@nsanden</a></strong> <a href="https://github.com/Codeception/Codeception/issues/2588">#2588</a>
25+
* <strong>[WebDriver]</strong> Allows adding ssl proxy settings by <strong><a href="https://github.com/mjntan35">@mjntan35</a></strong>.
26+
* <strong>[Symfony2]</strong> Config option `cache_router` added (disabled by default) by <strong><a href="https://github.com/raistlin">@raistlin</a></strong>.
27+
* <strong>[Doctrine]</strong> Fixed <a href="https://github.com/Codeception/Codeception/issues/2060">#2060</a>: Too many connections error by <strong><a href="https://github.com/dranzd">@dranzd</a></strong>
28+
* <strong>[Symfony2]</strong> `services` part added to allow access Symfony DIC while wokring with WebDriver or PhpBrowser by <strong><a href="https://github.com/laszlo">@laszlo</a></strong>-karpati See <a href="https://github.com/Codeception/Codeception/issues/2629">#2629</a>
29+
* <strong>[WebDriver]</strong><strong>[PhpBrowser]</strong> Unified setCookie "expires" param name by <strong><a href="https://github.com/davertmik">@davertmik</a></strong>. See <a href="https://github.com/Codeception/Codeception/issues/2582">#2582</a>
30+
* <strong>[Memcache]</strong> add adaptive close call on `_after` by <strong><a href="https://github.com/pfz">@pfz</a></strong>. See <a href="https://github.com/Codeception/Codeception/issues/2572">#2572</a>
31+
* <strong>[Symfony2]</strong> Move kernel booting and container set up into _initialize() method by <strong><a href="https://github.com/Franua">@Franua</a></strong> <a href="https://github.com/Codeception/Codeception/issues/2491">#2491</a>
32+
* <strong>[WebDriver]</strong> Fixed `seeInField` for textareas by <strong><a href="https://github.com/nsanden">@nsanden</a></strong>
33+
* <strong>[Yii2]</strong><strong>[REST]</strong> Fixed using Yii2 as dependency for REST by <strong><a href="https://github.com/Naktibalda">@Naktibalda</a></strong>. See <a href="https://github.com/Codeception/Codeception/issues/2562">#2562</a>
34+
* <strong>[Laravel5]</strong> Removed `enableMiddleware` and `enableEvents` methods. See <a href="https://github.com/Codeception/Codeception/issues/2602">#2602</a>. By <strong><a href="https://github.com/janhenkgerritsen">@janhenkgerritsen</a></strong>
35+
* <strong>[Laravel]</strong> Refactored modules. See <a href="https://github.com/Codeception/Codeception/issues/2602">#2602</a>. By <strong><a href="https://github.com/janhenkgerritsen">@janhenkgerritsen</a></strong>
36+
* <strong>[Laravel5]</strong> Fix bug for `seeCurrentRouteIs` when routes don't match. See <a href="https://github.com/Codeception/Codeception/issues/2593">#2593</a>. By <strong><a href="https://github.com/maddhatter">@maddhatter</a></strong>
37+
* <strong>[PhpBrowser]</strong> Set curl options for Guzzle6 correctly. See <a href="https://github.com/Codeception/Codeception/issues/2533">#2533</a>. By <strong><a href="https://github.com/Naktibalda">@Naktibalda</a></strong>
38+
* Fixed usage of GroupObject by unit tests. GroupObjects can skip tests by <strong><a href="https://github.com/davetmik">@davetmik</a></strong>. See <a href="https://github.com/Codeception/Codeception/issues/2617">#2617</a>
39+
40+
1041
#### 2.1.4
1142

1243
* <strong>[PhpBrowser]</strong><strong>[Frameworks]</strong> Added `_getResponseContent` hidden method. By <strong><a href="https://github.com/Naktibalda">@Naktibalda</a></strong>

docs/04-FunctionalTests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ modules:
170170

171171
## Writing Functional Tests
172172

173-
Functional tests are written in the same manner as [Acceptance Tests](http://codeception.com/docs/04-AcceptanceTests) with `PhpBrowser` module enabled. All framework modules and `PhpBrowser` module share the same methods and the same engine.
173+
Functional tests are written in the same manner as [Acceptance Tests](http://codeception.com/docs/03-AcceptanceTests) with `PhpBrowser` module enabled. All framework modules and `PhpBrowser` module share the same methods and the same engine.
174174

175175
Therefore we can open a web page with `amOnPage` command.
176176

docs/05-UnitTests.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ function testUserNameCanBeChanged()
292292

293293
{% endhighlight %}
294294

295-
In both examples you should not be worried about the data persistance between tests.
295+
In both examples you should not be worried about the data persistence between tests.
296296
Doctrine2 module as well as Laravel4 module will clean up created data at the end of a test.
297297
This is done by wrapping a test in a transaction and rolling it back afterwards.
298298

@@ -375,7 +375,7 @@ modules:
375375
<div class="alert alert-info">
376376
It may look like Cest format is too simple for writing tests. It doesn't provide assertion methods,
377377
methods to create mocks and stubs or even accessing the module with `getModule`, as we did in example above.
378-
However Cest format is better at separating concerns. Test code does not interefere with support code, provided by `UnitTester` object. All additional actions you may need in your unit/intergation tests you can implement in `Helper\Unit` class. This is the recommended approach, and allows keeping tests verbose and clean.
378+
However Cest format is better at separating concerns. Test code does not interfere with support code, provided by `UnitTester` object. All additional actions you may need in your unit/integration tests you can implement in `Helper\Unit` class. This is the recommended approach, and allows keeping tests verbose and clean.
379379
</div>
380380

381381

docs/06-ReusingTestCode.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class AcceptanceTester extends \Codeception\Actor
9090
{
9191
$I = $this;
9292
$I->amOnPage('/login');
93-
$I->submitForm('#loginForm' [
93+
$I->submitForm('#loginForm', [
9494
'login' => $name,
9595
'password' => $password
9696
]);
@@ -193,7 +193,7 @@ $I->loginAsAdmin();
193193

194194
{% endhighlight %}
195195

196-
Same as above, StepObject can be instanticated automatically by Dependency Injection Container, when used inside Cest format:
196+
Same as above, StepObject can be instantiated automatically by Dependency Injection Container, when used inside Cest format:
197197

198198
{% highlight php %}
199199

@@ -216,7 +216,7 @@ If you have complex interaction scenario you may use several step objects in one
216216

217217
## PageObjects
218218

219-
For acceptance and functional testing we will need not only to have common actions to be reused accross different tests, we should have buttons, links, and form fields to be reused as well. For those cases we need to implement
219+
For acceptance and functional testing we will need not only to have common actions to be reused across different tests, we should have buttons, links, and form fields to be reused as well. For those cases we need to implement
220220
[PageObject pattern](http://code.google.com/p/selenium/wiki/PageObjects), which is widely used by test automation engineers. The PageObject pattern represents a web page as a class and the DOM elements on that page as its properties, and some basic interactions as its methods.
221221
PageObjects are very important when you are developing a flexible architecture of your tests. Please do not hardcode complex CSS or XPath locators in your tests but rather move them into PageObject classes.
222222

@@ -343,7 +343,7 @@ class UserCest
343343

344344
{% endhighlight %}
345345

346-
The dependency injection container can construct any object that require any known class type. For instance, `Page\Login` required `AcceptanceTester`, and so it was injected into `Page\Login` constructor, and PageObject was created and passed into method arguments. You should specify explicitly the types of requried objects for Codeception to know what objects should be created for a test. Dependency Injection will be described in the next chapter.
346+
The dependency injection container can construct any object that require any known class type. For instance, `Page\Login` required `AcceptanceTester`, and so it was injected into `Page\Login` constructor, and PageObject was created and passed into method arguments. You should specify explicitly the types of required objects for Codeception to know what objects should be created for a test. Dependency Injection will be described in the next chapter.
347347

348348
## Helpers
349349

docs/07-AdvancedUsage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class BasicCest
4646

4747
**Each public method of Cest (except those starting with `_`) will be executed as a test** and will receive Actor class as the first parameter and `$scenario` variable as the second one.
4848

49-
In `_before` and `_after` methods you can use common setups and teardowns for the tests in the class. This actually makes Cest tests more flexible then Cepts, which rely only on similar methods in Helper classes.
49+
In `_before` and `_after` methods you can use common setups and teardowns for the tests in the class. This actually makes Cest tests more flexible than Cepts, which rely only on similar methods in Helper classes.
5050

5151
As you see, we are passing Actor object into `tryToTest` method. It allows us to write scenarios the way we did before.
5252

@@ -153,7 +153,7 @@ class MathTest extends \Codeception\TestCase\Test
153153

154154
However, Dependency Injection is not limited to this. It allows you to **inject any class**, which can be constructed with arguments known to Codeception.
155155

156-
In order to make auto-wiring work, you will need to implement `_inject()` method with the list of desired arguments. It is important to speicfy the type of arguments, so Codeception can guess which objects are expected to be received. The `_inject()` will be invoked just once right after creation of the TestCase object (either Cest or Test). Dependency Injection will also work in a similar manner for Helper and Actor classes.
156+
In order to make auto-wiring work, you will need to implement `_inject()` method with the list of desired arguments. It is important to specify the type of arguments, so Codeception can guess which objects are expected to be received. The `_inject()` will be invoked just once right after creation of the TestCase object (either Cest or Test). Dependency Injection will also work in a similar manner for Helper and Actor classes.
157157

158158
Each test of Cest class can declare its own dependencies and receive them from method arguments:
159159

docs/08-Customization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ It allows you to rerun failed tests with `-g failed` option:
8383

8484
{% endhighlight %}
8585

86-
Codeception comes with bundled extensions located in `ext` directory. For instance, you can enable Logger extension to log test exection with Monolog
86+
Codeception comes with bundled extensions located in `ext` directory. For instance, you can enable Logger extension to log test execution with Monolog
8787

8888
{% highlight yaml %}
8989

docs/10-WebServices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ $I->seeXmlResponseIncludes(XmlUtils::toXml(
195195

196196
{% endhighlight %}
197197

198-
We are using XmlUtils class which allows us to build XML structures in a clean manner. The `toXml` method may accept a string or array and returns \DOMDocument instance. If your XML contains attributes and so can't be represented as a PHP array you can create XML using the [XmlBulder](http://codeception.com/docs/reference/XmlBuilder) class. We will take a look at it a bit more in next section.
198+
We are using XmlUtils class which allows us to build XML structures in a clean manner. The `toXml` method may accept a string or array and returns \DOMDocument instance. If your XML contains attributes and so can't be represented as a PHP array you can create XML using the [XmlBuilder](http://codeception.com/docs/reference/XmlBuilder) class. We will take a look at it a bit more in next section.
199199

200200
<div class="alert alert-info">
201201
Use `\Codeception\Util\Xml::build()` to create XmlBuilder instance.

docs/11-Codecoverage.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ That's ok for now. But what files should be present in final coverage report? Yo
3333
{% highlight yaml %}
3434

3535
coverage:
36+
enabled: true
3637
whitelist:
3738
include:
3839
- app/*

docs/12-ParallelExecution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ $ robo parallel:run
308308

309309
### Step 3: Merge Results
310310

311-
We should not rely on console output when running our tests. In case of `parallelExec` task, some text can be missed. We recommmend to save results as JUnit XML, which can be merged and plugged into Continuous Integration server.
311+
We should not rely on console output when running our tests. In case of `parallelExec` task, some text can be missed. We recommend to save results as JUnit XML, which can be merged and plugged into Continuous Integration server.
312312

313313
{% highlight php %}
314314

0 commit comments

Comments
 (0)