Skip to content

Commit 986b7d4

Browse files
committed
auto updated documentation
1 parent d96ba20 commit 986b7d4

14 files changed

+170
-66
lines changed

changelog.markdown

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

88
# Changelog
99

10+
#### 2.2.5
11+
12+
* Support for PhpUnit 5.x.
13+
* **[Lumen]** Major refactoring of Lumen module. See [[#3533](https://github.com/Codeception/Codeception/issues/3533)](https://github.com/Codeception/Codeception/pull/3533). By **[janhenkgerritsen](https://github.com/janhenkgerritsen)**
14+
* **[Laravel5]** Removed calls to `Auth::logout()`, `Session::flush()` and `Cache::flush()` from after hook. See [#3493](https://github.com/Codeception/Codeception/issues/3493). By **[janhenkgerritsen](https://github.com/janhenkgerritsen)**
15+
* **[Memcache]** Updated `Memcache::seeInMemcached` to check if the key exists alone or with the desired value. By **[sergeyklay](https://github.com/sergeyklay)**
16+
* **[Memcache]** Added `Memcache::haveInMemcached`. By **[sergeyklay](https://github.com/sergeyklay)**
17+
* **[Memcache]** Fixed `Memcache::dontSeeInMemcached`. By **[sergeyklay](https://github.com/sergeyklay)**
18+
* **[ZF2]** Zend Framework 3 Support. Made `init_autoloader` optional, because ZF3 uses composer for autoloading [#3525](https://github.com/Codeception/Codeception/issues/3525). By **[Naktibalda](https://github.com/Naktibalda)**
19+
* **[ZF2]** Fixed accessing Doctrine Entity Manager when client is not initialized. By **[chris1312](https://github.com/chris1312)**. See [#3524](https://github.com/Codeception/Codeception/issues/3524)
20+
* **[Yii2]** Allow to load fixtures from `_fixtures` method of a testcase. [See reference](http://codeception.com/docs/modules/Yii2#Fixtures). Fixes usage of nested transactions [#3520](https://github.com/Codeception/Codeception/issues/3520). By **[kalyabin](https://github.com/kalyabin)** and **[davertmik](https://github.com/davertmik)**
21+
* **[Yii1]** Fix private property accessible; allows to change urlManager class to subclass of CUrlManager. See **[3287](https://github.com/3287)**. By **[amashigeseiji](https://github.com/amashigeseiji)**
22+
* Escaped tags in debug output by **[Naktibalda](https://github.com/Naktibalda)**. See [#3507](https://github.com/Codeception/Codeception/issues/3507). Fixes [#3495](https://github.com/Codeception/Codeception/issues/3495)
23+
* Fixed [#3410](https://github.com/Codeception/Codeception/issues/3410): Wrong subSteps rendering in HTML ResultPrinter by **[niclopez](https://github.com/niclopez)**
24+
* **[WebDriver]** Improved exception message thrown when click('name') does not match any element [#3546](https://github.com/Codeception/Codeception/issues/3546) by **[Naktibalda](https://github.com/Naktibalda)**. Fixes [#3528](https://github.com/Codeception/Codeception/issues/3528)
25+
* **[SOAP]** Removed conflict with REST module. `seeResponseCodeIs` is deprecated in favor of `seeSoapResponseCodeIs` by **[eXorus](https://github.com/eXorus)**. See [#3512](https://github.com/Codeception/Codeception/issues/3512). Fixes [#3512](https://github.com/Codeception/Codeception/issues/3512)
26+
* Fixed [#3472](https://github.com/Codeception/Codeception/issues/3472): group Files not working with a non-empty data provider by **[eXorus](https://github.com/eXorus)**
27+
* **[REST]** Disabled resetting server parameters in _before. Fixed REST+Laravel usage: [#3263](https://github.com/Codeception/Codeception/issues/3263). See [#3539](https://github.com/Codeception/Codeception/issues/3539). By **[janhenkgerritsen](https://github.com/janhenkgerritsen)**
28+
* **[REST]** Improved output of failed JsonType assertions [#3480](https://github.com/Codeception/Codeception/issues/3480). By **[Naktibalda](https://github.com/Naktibalda)**. Fixes [#2858](https://github.com/Codeception/Codeception/issues/2858)
29+
* **[REST]** Requests are added to browser history [#3446](https://github.com/Codeception/Codeception/issues/3446). Fixes regression [#3197](https://github.com/Codeception/Codeception/issues/3197). By **[Naktibalda](https://github.com/Naktibalda)**
30+
* **[REST]** application/json header check made case insensitive. Fixes [#3516](https://github.com/Codeception/Codeception/issues/3516). By **[Naktibalda](https://github.com/Naktibalda)**
31+
* Fix bug in Coverage Filter related to relative filepaths [#3518](https://github.com/Codeception/Codeception/issues/3518). By **[sbacic](https://github.com/sbacic)**
32+
* **[Db]** PostgreSQL: fixed a problem when sequences are not a standard format (ie. table_id_seq). See [#3506](https://github.com/Codeception/Codeception/issues/3506). By **[alexjeen](https://github.com/alexjeen)**
33+
* **[Symfony]** Persist doctrine.dbal.backend_connection if Doctrine2 module is used [#3500](https://github.com/Codeception/Codeception/issues/3500). Fixes [#3479](https://github.com/Codeception/Codeception/issues/3479). By **[Naktibalda](https://github.com/Naktibalda)**
34+
* **[Doctrine2]** Using `Doctrine\ORM\EntityManagerInterface` as valid em instance [#3467](https://github.com/Codeception/Codeception/issues/3467). Fixes [#3459](https://github.com/Codeception/Codeception/issues/3459). By **[akbwm](https://github.com/akbwm)**
35+
* **[MongoDb]** Fixes `mongorestore` command syntax and adds --quiet option to config
36+
* **[Facebook]** Replaced `facebook/php-sdk-v4` library with `facebook/graph-sdk`.
37+
* Fixed [#3433](https://github.com/Codeception/Codeception/issues/3433) detection of relative path when `codeception.yml` is not in project root. See [#3434](https://github.com/Codeception/Codeception/issues/3434). By **[loren](https://github.com/loren)**-osborn
38+
* Handle deprecation messages according to `error_level` setting [#3460](https://github.com/Codeception/Codeception/issues/3460). Fixes [#3424](https://github.com/Codeception/Codeception/issues/3424). By **[Naktibalda](https://github.com/Naktibalda)**.
39+
1040
#### 2.2.4
1141

1242
* Improved using complex params, nested params can be set using dot (`.`). See [#3339](https://github.com/Codeception/Codeception/issues/3339)

docs/02-GettingStarted.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -259,15 +259,15 @@ php codecept run
259259

260260
{% endhighlight %}
261261

262-
With the first argument you can run tests from one suite.
262+
With the first argument you can run all tests from one suite.
263263

264264
{% highlight bash %}
265265

266266
php codecept run acceptance
267267

268268
{% endhighlight %}
269269

270-
To run exactly one test, add a second argument. Provide a local path to the test, from the suite directory.
270+
To limit tests run to a single class, add a second argument. Provide a local path to the test class, from the suite directory.
271271

272272
{% highlight bash %}
273273

@@ -283,23 +283,29 @@ php codecept run tests/acceptance/SigninCept.php
283283

284284
{% endhighlight %}
285285

286-
You can execute one test from a test class (for Cest or Test formats)
286+
You can further filter which tests are run by appending a method name to the class, separated by a colon (for Cest or Test formats):
287287

288288
{% highlight bash %}
289289

290-
php codecept run tests/acceptance/SignInCest.php:anonymousLogin
290+
php codecept run tests/acceptance/SignInCest.php:^anonymousLogin$
291291

292292
{% endhighlight %}
293293

294-
You can provide a directory path as well:
294+
You can provide a directory path as well. This will execute all tests from the backend dir:
295295

296296
{% highlight bash %}
297297

298298
php codecept run tests/acceptance/backend
299299

300300
{% endhighlight %}
301301

302-
This will execute all tests from the backend dir.
302+
Using regular expressions, you can even run many different test methods from the same directory or class. For example, this will execute all tests from the backend dir beginning with the word login:
303+
304+
{% highlight bash %}
305+
306+
php codecept run tests/acceptance/backend:^login
307+
308+
{% endhighlight %}
303309

304310
To execute a group of tests that are not stored in the same directory, you can organize them in [groups](http://codeception.com/docs/07-AdvancedUsage#Groups).
305311

docs/03-AcceptanceTests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ $I->amOnPage('/messages');
392392
$nick = $I->haveFriend('nick');
393393
$nick->does(function(AcceptanceTester $I) {
394394
$I->amOnPage('/messages/new');
395-
$I->fillField('body', 'Hello all!')
395+
$I->fillField('body', 'Hello all!');
396396
$I->click('Send');
397397
$I->see('Hello all!', '.message');
398398
});

docs/06-ReusingTestCode.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,11 @@ However, implementing all actions for a reuse in one actor class may lead to bre
118118
### Session Snapshot
119119

120120
If you need to authorize user for each test you can do so by filling Login form in the beginning of each test.
121-
Running those steps take time, and in case of Selenium tests (which are slow by themselves) can be this time can be significant.
121+
Running those steps takes time, and in the case of Selenium tests (which are slow by themselves) that time loss can become significant.
122122

123-
Codeception allows you to share cookies between tests, so once logged in user could stay authorized for other tests.
123+
Codeception allows you to share cookies between tests, so a test user can stay logged in for other tests.
124124

125-
Let's improve code of our `login` method by making it executed only once for the first login and then restore the session from cookies.
125+
Let's improve the code of our `login` method, executing the form submission only once and restoring the session from cookies for each subsequent login function call.
126126

127127
{% highlight php %}
128128

@@ -148,22 +148,21 @@ Let's improve code of our `login` method by making it executed only once for the
148148

149149
{% endhighlight %}
150150

151-
Please note that session restoration only works for `WebDriver` module (modules implementing `Codeception\Lib\Interfaces\SessionSnapshot`)
151+
Please note that session restoration only works for `WebDriver` modules (modules implementing `Codeception\Lib\Interfaces\SessionSnapshot`).
152152

153153
## StepObjects
154154

155-
If `login` method defined in Actor class may be used in 90% of your tests,
156-
StepObjects are great if you need some common functionality for a group of tests. Let's say you are going to test an admin area of a site. Probably, you won't need the same actions from admin area while testing the frontend, so it's a good idea to move those admin-specific into their own class. We will call such class a StepObject.
155+
StepObjects are great if you need some common functionality for a group of tests. Let's say you are going to test an admin area of a site. Probably, you won't need the same actions from admin area while testing the frontend, so it's a good idea to move these admin-specific tests into their own class. We will call such a class a StepObject.
157156

158-
Lets create an Admin StepObject with generator, by specifying test suite, and passing method expected names on prompt.
157+
Lets create an Admin StepObject with the generator:
159158

160159
{% highlight bash %}
161160

162161
php codecept generate:stepobject acceptance Admin
163162

164163
{% endhighlight %}
165164

166-
You will be asked to enter action names, but it's optional. Enter one at a time, and press Enter. After specifying all needed actions, leave empty line to go on to StepObject creation.
165+
You can supply optional action names. Enter one at a time, followed by a newline. End with an empty line to continue to StepObject creation.
167166

168167
{% highlight bash %}
169168

@@ -174,7 +173,7 @@ StepObject was created in /tests/acceptance/_support/Step/Acceptance/Admin.php
174173

175174
{% endhighlight %}
176175

177-
It will generate class in `/tests/_support/Step/Acceptance/Admin.php` similar to this:
176+
This will generate a class in `/tests/_support/Step/Acceptance/Admin.php` similar to this:
178177

179178
{% highlight php %}
180179

@@ -192,7 +191,7 @@ class Admin extends \AcceptanceTester
192191
193192
{% endhighlight %}
194193
195-
As you see, this class is very simple. It extends `AcceptanceTester` class, thus, all methods and properties of `AcceptanceTester` are available for usage in it.
194+
As you see, this class is very simple. It extends `AcceptanceTester` class, meaning it can access all methods and properties of `AcceptanceTester`.
196195
197196
`loginAsAdmin` method may be implemented like this:
198197
@@ -201,7 +200,7 @@ As you see, this class is very simple. It extends `AcceptanceTester` class, thus
201200
<?php
202201
namespace Step\Acceptance;
203202
204-
class Member extends \AcceptanceTester
203+
class Admin extends \AcceptanceTester
205204
{
206205
public function loginAsAdmin()
207206
{

docs/09-Data.md

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

3030

3131
<div class="alert alert-notice">
32-
Use [module params](06-ModulesAndHelpers#DynamicConfiguration With Params) to set database credentials from environment variables or from application configuration files.
32+
Use <a href="http://codeception.com/docs/06-ModulesAndHelpers#Dynamic-Configuration-With-Params">module params</a> to set database credentials from environment variables or from application configuration files.
3333
</div>
3434

3535
After you enable this module in your test suite, it will automatically populate the database from a dump and repopulate it on each test run. These settings can be changed through the `populate` and `cleanup` options, which may be set to `false`.

docs/modules/AngularJS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ $I->pressKey('#name', array('ctrl', 'a'), \Facebook\WebDriver\WebDriverKeys::DEL
856856
{% endhighlight %}
857857

858858
* `param` $element
859-
* `param` $char Can be char or array with modifier. You can provide several chars.
859+
* `param` $char string|array Can be char or array with modifier. You can provide several chars.
860860
* `throws` \Codeception\Exception\ElementNotFound
861861

862862

docs/modules/Db.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ if you run into problems loading dumps and cleaning databases.
5656
* password *required* - password
5757
* dump - path to database dump
5858
* populate: true - whether the the dump should be loaded before the test suite is started
59-
* cleanup: true - whether the dump should be reloaded after each test
59+
* cleanup: true - whether the dump should be reloaded before each test
6060
* reconnect: false - whether the module should reconnect to the database before each test
6161

6262
### Example

docs/modules/Lumen.md

Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,16 @@ Please try it and leave your feedback.
2929
* bootstrap: `string`, default `bootstrap/app.php` - Relative path to app.php config file.
3030
* root: `string`, default `` - Root path of our application.
3131
* packages: `string`, default `workbench` - Root path of application packages (if any).
32+
* url: `string`, default `http://localhost` - The application URL
3233

3334
### API
3435

35-
* app - `Illuminate\Foundation\Application` instance
36-
* client - `BrowserKit` client
36+
* app - `\Laravel\Lumen\Application` instance
37+
* client - `\Symfony\Component\BrowserKit\Client` instance
3738

39+
### Parts
40+
41+
* ORM - include only haveRecord/grabRecord/seeRecord/dontSeeRecord actions
3842

3943

4044
### Actions
@@ -176,11 +180,10 @@ Authenticates user for HTTP_AUTH
176180

177181
#### amLoggedAs
178182

179-
Set the currently logged in user for the application.
180-
Takes either an object that implements the User interface or
181-
an array of credentials.
183+
Set the authenticated user for the next request.
184+
This will not persist between multiple requests.
182185

183-
* `param` \Illuminate\Contracts\Auth\User|array $user
186+
* `param` \Illuminate\Contracts\Auth\Authenticatable
184187
* `param` string|null $driver The authentication driver for Lumen <= 5.1.*, guard name for Lumen >= 5.2
185188
* `return` void
186189

@@ -340,7 +343,7 @@ For checking the raw source code, use `seeInSource()`.
340343

341344
#### dontSeeAuthentication
342345

343-
Check that user is not authenticated
346+
Check that user is not authenticated.
344347

345348

346349
#### dontSeeCheckboxIsChecked
@@ -775,6 +778,10 @@ $value = $I->grabTextFrom('~<input value=(.*?)]~sgi'); // match with a regex
775778
* `return` array|mixed|null|string
776779

777780

781+
#### have
782+
__not documented__
783+
784+
778785
#### haveHttpHeader
779786

780787
Sets the HTTP header to the passed value - which is used on
@@ -795,6 +802,10 @@ $I->amOnPage('test-headers.php');
795802
requests
796803

797804

805+
#### haveMultiple
806+
__not documented__
807+
808+
798809
#### haveRecord
799810

800811
Inserts record into the database.
@@ -816,11 +827,6 @@ $user = $I->haveRecord('App\User', array('name' => 'Davert')); // returns Eloque
816827
* `[Part]` orm
817828

818829

819-
#### logout
820-
821-
Logs user out
822-
823-
824830
#### moveBack
825831

826832
Moves back in history.
@@ -874,7 +880,7 @@ For checking the raw source code, use `seeInSource()`.
874880

875881
#### seeAuthentication
876882

877-
Checks that user is authenticated
883+
Checks that user is authenticated.
878884

879885

880886
#### seeCheckboxIsChecked
@@ -1079,15 +1085,6 @@ $I->seeInFormFields('//form[ * `id=my-form]',` $form);
10791085
* `param` $params
10801086

10811087

1082-
#### seeInSession
1083-
1084-
Assert that the session has a given list of values.
1085-
1086-
* `param` string|array $key
1087-
* `param` mixed $value
1088-
* `return` void
1089-
1090-
10911088
#### seeInSource
10921089

10931090
Checks that the current page contains the given string in its
@@ -1213,14 +1210,6 @@ $I->seeResponseCodeIs(\Codeception\Util\HttpCode::OK);
12131210
* `param` $code
12141211

12151212

1216-
#### seeSessionHasValues
1217-
1218-
Assert that the session has a given list of values.
1219-
1220-
* `param` array $bindings
1221-
* `return` void
1222-
1223-
12241213
#### selectOption
12251214

12261215
Selects an option in a select tag or in radio button group.
@@ -1317,6 +1306,11 @@ $I->sendAjaxRequest('PUT', '/posts/7', array('title' => 'new title'));
13171306
* `param` $params
13181307

13191308

1309+
#### setApplication
1310+
1311+
* `param \Laravel\Lumen\Application` $app
1312+
1313+
13201314
#### setCookie
13211315

13221316
Sets a cookie with the given name and value.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy