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: changelog.markdown
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,37 @@ title: Codeception Changelog
7
7
8
8
# Changelog
9
9
10
+
#### 2.1.5
11
+
12
+
***PHP7 support**
13
+
***Symfony3 support**
14
+
* <strong>[ZendExpressive]</strong> **module added** by <strong><ahref="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 <ahref="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><ahref="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><ahref="https://github.com/Naktibalda">@Naktibalda</a></strong>. Fixes <ahref="https://github.com/Codeception/Codeception/issues/2635">#2635</a>
19
+
* <strong>[REST]</strong> Fixes validation of several types with filters. See <ahref="https://github.com/Codeception/Codeception/issues/2581">#2581</a> By <strong><ahref="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><ahref="https://github.com/davertmik">@davertmik</a></strong>
22
+
* <strong>[REST]</strong> Various fixes to JsonType: <ahref="https://github.com/Codeception/Codeception/issues/2555">#2555</a> <ahref="https://github.com/Codeception/Codeception/issues/2548">#2548</a> <ahref="https://github.com/Codeception/Codeception/issues/2542">#2542</a>
23
+
* <strong>[REST]</strong> Hides binary request data in debug by <strong><ahref="https://github.com/codemedic">@codemedic</a></strong>. Fixed <ahref="https://github.com/Codeception/Codeception/issues/1884">#1884</a>, See <ahref="https://github.com/Codeception/Codeception/issues/2552">#2552</a>
24
+
* <strong>[WebDriver]</strong> Allow `appendField` to work with content editable div by <strong><ahref="https://github.com/nsanden">@nsanden</a></strong> <ahref="https://github.com/Codeception/Codeception/issues/2588">#2588</a>
25
+
* <strong>[WebDriver]</strong> Allows adding ssl proxy settings by <strong><ahref="https://github.com/mjntan35">@mjntan35</a></strong>.
26
+
* <strong>[Symfony2]</strong> Config option `cache_router` added (disabled by default) by <strong><ahref="https://github.com/raistlin">@raistlin</a></strong>.
27
+
* <strong>[Doctrine]</strong> Fixed <ahref="https://github.com/Codeception/Codeception/issues/2060">#2060</a>: Too many connections error by <strong><ahref="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><ahref="https://github.com/laszlo">@laszlo</a></strong>-karpati See <ahref="https://github.com/Codeception/Codeception/issues/2629">#2629</a>
29
+
* <strong>[WebDriver]</strong><strong>[PhpBrowser]</strong> Unified setCookie "expires" param name by <strong><ahref="https://github.com/davertmik">@davertmik</a></strong>. See <ahref="https://github.com/Codeception/Codeception/issues/2582">#2582</a>
30
+
* <strong>[Memcache]</strong> add adaptive close call on `_after` by <strong><ahref="https://github.com/pfz">@pfz</a></strong>. See <ahref="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><ahref="https://github.com/Franua">@Franua</a></strong> <ahref="https://github.com/Codeception/Codeception/issues/2491">#2491</a>
32
+
* <strong>[WebDriver]</strong> Fixed `seeInField` for textareas by <strong><ahref="https://github.com/nsanden">@nsanden</a></strong>
33
+
* <strong>[Yii2]</strong><strong>[REST]</strong> Fixed using Yii2 as dependency for REST by <strong><ahref="https://github.com/Naktibalda">@Naktibalda</a></strong>. See <ahref="https://github.com/Codeception/Codeception/issues/2562">#2562</a>
34
+
* <strong>[Laravel5]</strong> Removed `enableMiddleware` and `enableEvents` methods. See <ahref="https://github.com/Codeception/Codeception/issues/2602">#2602</a>. By <strong><ahref="https://github.com/janhenkgerritsen">@janhenkgerritsen</a></strong>
35
+
* <strong>[Laravel]</strong> Refactored modules. See <ahref="https://github.com/Codeception/Codeception/issues/2602">#2602</a>. By <strong><ahref="https://github.com/janhenkgerritsen">@janhenkgerritsen</a></strong>
36
+
* <strong>[Laravel5]</strong> Fix bug for `seeCurrentRouteIs` when routes don't match. See <ahref="https://github.com/Codeception/Codeception/issues/2593">#2593</a>. By <strong><ahref="https://github.com/maddhatter">@maddhatter</a></strong>
37
+
* <strong>[PhpBrowser]</strong> Set curl options for Guzzle6 correctly. See <ahref="https://github.com/Codeception/Codeception/issues/2533">#2533</a>. By <strong><ahref="https://github.com/Naktibalda">@Naktibalda</a></strong>
38
+
* Fixed usage of GroupObject by unit tests. GroupObjects can skip tests by <strong><ahref="https://github.com/davetmik">@davetmik</a></strong>. See <ahref="https://github.com/Codeception/Codeception/issues/2617">#2617</a>
39
+
40
+
10
41
#### 2.1.4
11
42
12
43
* <strong>[PhpBrowser]</strong><strong>[Frameworks]</strong> Added `_getResponseContent` hidden method. By <strong><ahref="https://github.com/Naktibalda">@Naktibalda</a></strong>
Copy file name to clipboardExpand all lines: docs/04-FunctionalTests.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -170,7 +170,7 @@ modules:
170
170
171
171
## Writing Functional Tests
172
172
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.
174
174
175
175
Therefore we can open a web page with `amOnPage` command.
Copy file name to clipboardExpand all lines: docs/05-UnitTests.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -292,7 +292,7 @@ function testUserNameCanBeChanged()
292
292
293
293
{% endhighlight %}
294
294
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.
296
296
Doctrine2 module as well as Laravel4 module will clean up created data at the end of a test.
297
297
This is done by wrapping a test in a transaction and rolling it back afterwards.
298
298
@@ -375,7 +375,7 @@ modules:
375
375
<divclass="alert alert-info">
376
376
It may look like Cest format is too simple for writing tests. It doesn't provide assertion methods,
377
377
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.
Copy file name to clipboardExpand all lines: docs/06-ReusingTestCode.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,7 +90,7 @@ class AcceptanceTester extends \Codeception\Actor
90
90
{
91
91
$I = $this;
92
92
$I->amOnPage('/login');
93
-
$I->submitForm('#loginForm' [
93
+
$I->submitForm('#loginForm', [
94
94
'login' => $name,
95
95
'password' => $password
96
96
]);
@@ -193,7 +193,7 @@ $I->loginAsAdmin();
193
193
194
194
{% endhighlight %}
195
195
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:
197
197
198
198
{% highlight php %}
199
199
@@ -216,7 +216,7 @@ If you have complex interaction scenario you may use several step objects in one
216
216
217
217
## PageObjects
218
218
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
220
220
[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.
221
221
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.
222
222
@@ -343,7 +343,7 @@ class UserCest
343
343
344
344
{% endhighlight %}
345
345
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.
Copy file name to clipboardExpand all lines: docs/07-AdvancedUsage.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ class BasicCest
46
46
47
47
**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.
48
48
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.
50
50
51
51
As you see, we are passing Actor object into `tryToTest` method. It allows us to write scenarios the way we did before.
52
52
@@ -153,7 +153,7 @@ class MathTest extends \Codeception\TestCase\Test
153
153
154
154
However, Dependency Injection is not limited to this. It allows you to **inject any class**, which can be constructed with arguments known to Codeception.
155
155
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.
157
157
158
158
Each test of Cest class can declare its own dependencies and receive them from method arguments:
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.
199
199
200
200
<divclass="alert alert-info">
201
201
Use `\Codeception\Util\Xml::build()` to create XmlBuilder instance.
Copy file name to clipboardExpand all lines: docs/12-ParallelExecution.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -308,7 +308,7 @@ $ robo parallel:run
308
308
309
309
### Step 3: Merge Results
310
310
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.
0 commit comments