Skip to content

Commit 911744f

Browse files
committed
auto updated documentation
1 parent 0e18d3b commit 911744f

File tree

14 files changed

+472
-58
lines changed

14 files changed

+472
-58
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/PhpBrowser">PhpBrowser</a></li><li><a href="/docs/modules/AngularJS">AngularJS</a></li><li><a href="/docs/modules/Queue">Queue</a></li><li><a href="/docs/modules/Asserts">Asserts</a></li><li><a href="/docs/modules/REST">REST</a></li><li><a href="/docs/modules/Cli">Cli</a></li><li><a href="/docs/modules/Redis">Redis</a></li><li><a href="/docs/modules/DataFactory">DataFactory</a></li><li><a href="/docs/modules/SOAP">SOAP</a></li><li><a href="/docs/modules/Db">Db</a></li><li><a href="/docs/modules/Sequence">Sequence</a></li><li><a href="/docs/modules/Doctrine2">Doctrine2</a></li><li><a href="/docs/modules/Silex">Silex</a></li><li><a href="/docs/modules/FTP">FTP</a></li><li><a href="/docs/modules/Symfony">Symfony</a></li><li><a href="/docs/modules/Facebook">Facebook</a></li><li><a href="/docs/modules/WebDriver">WebDriver</a></li><li><a href="/docs/modules/Filesystem">Filesystem</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/Phalcon">Phalcon</a></li><li><a href="/docs/modules/ZendExpressive">ZendExpressive</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/AngularJS">AngularJS</a></li><li><a href="/docs/modules/Queue">Queue</a></li><li><a href="/docs/modules/Apc">Apc</a></li><li><a href="/docs/modules/REST">REST</a></li><li><a href="/docs/modules/Asserts">Asserts</a></li><li><a href="/docs/modules/Redis">Redis</a></li><li><a href="/docs/modules/Cli">Cli</a></li><li><a href="/docs/modules/SOAP">SOAP</a></li><li><a href="/docs/modules/DataFactory">DataFactory</a></li><li><a href="/docs/modules/Sequence">Sequence</a></li><li><a href="/docs/modules/Db">Db</a></li><li><a href="/docs/modules/Silex">Silex</a></li><li><a href="/docs/modules/Doctrine2">Doctrine2</a></li><li><a href="/docs/modules/Symfony">Symfony</a></li><li><a href="/docs/modules/FTP">FTP</a></li><li><a href="/docs/modules/WebDriver">WebDriver</a></li><li><a href="/docs/modules/Facebook">Facebook</a></li><li><a href="/docs/modules/XMLRPC">XMLRPC</a></li><li><a href="/docs/modules/Filesystem">Filesystem</a></li><li><a href="/docs/modules/Yii1">Yii1</a></li><li><a href="/docs/modules/Laravel5">Laravel5</a></li><li><a href="/docs/modules/Yii2">Yii2</a></li><li><a href="/docs/modules/Lumen">Lumen</a></li><li><a href="/docs/modules/ZF1">ZF1</a></li><li><a href="/docs/modules/Memcache">Memcache</a></li><li><a href="/docs/modules/ZF2">ZF2</a></li><li><a href="/docs/modules/MongoDb">MongoDb</a></li><li><a href="/docs/modules/ZendExpressive">ZendExpressive</a></li><li><a href="/docs/modules/Phalcon">Phalcon</a></li>

changelog.markdown

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,51 @@ title: Codeception Changelog
77

88
# Changelog
99

10-
#### 2.2.5
10+
#### 2.2.6 (October 2016)
11+
12+
* Ability to update config on run with `--override` (`-o`) option. Usage Examples:
13+
* `codecept run -o "settings: shuffle: true"`: enable shuffle
14+
* `codecept run -o "settings: lint: false"`: disable linting
15+
* **[WebDriver]** **HTML report to include screenshots of failed tests.** See [#3602](https://github.com/Codeception/Codeception/issues/3602)
16+
* [PhpBrowser][Frameworks] HTML report to include HTML of failed tests. See [#3602](https://github.com/Codeception/Codeception/issues/3602)
17+
* **[Apc]** **Module added** to interact with the Alternative PHP Cache (APC) using either APCu or APC extension. By **[sergeyklay](https://github.com/sergeyklay)**
18+
* **[Laravel5]** Add `run_database_seeder` configuration option. See [#3625](https://github.com/Codeception/Codeception/issues/3625) and [#3630](https://github.com/Codeception/Codeception/issues/3630). By **[Bouhnosaure](https://github.com/Bouhnosaure)**
19+
* **[Laravel5]** Add `database_migrations_path` configuration option. See [#3628](https://github.com/Codeception/Codeception/issues/3628). By **[janhenkgerritsen](https://github.com/janhenkgerritsen)**
20+
* [Laravel5][Lumen] Fixed issue that caused the `have` and `haveMultiple` methods not being available when using the ORM part of the modules. See [#3587](https://github.com/Codeception/Codeception/issues/3587). By **[janhenkgerritsen](https://github.com/janhenkgerritsen)**
21+
* [PhpBrowser][Frameworks] Fixed clicking on a button inside the link
22+
* [PhpBrowser][Frameworks] Click on the first clickable item when clickBySelector is used
23+
* [PhpBrowser][Frameworks] Anchor is no longer sent to server
24+
* Removed tags from `see`/`dontSee` output and friends output
25+
* `--` separates options from arguments in `codecept run` by **[Naktibalda](https://github.com/Naktibalda)**. Fixes [#3614](https://github.com/Codeception/Codeception/issues/3614). See [#3615](https://github.com/Codeception/Codeception/issues/3615)
26+
* Fixed terminating run process with Ctrl-C for PHP 7.0. Disabled graceful termination
27+
* **[Yii2]** fixed Yii2 logging complex data by **[svoboda2010](https://github.com/svoboda2010)** Fixes [#3452](https://github.com/Codeception/Codeception/issues/3452)
28+
* **[Yii2]** `cleanup` set to true by default (as it was documented but not enabled).
29+
* **[Yii2]** Close db connections when running `haveFixtures` by **[Ni](https://github.com/Ni)**-san. Fixes [#3456](https://github.com/Codeception/Codeception/issues/3456). See [#3586](https://github.com/Codeception/Codeception/issues/3586)
30+
* **[Yii2]** Fixed loading fixtures from `_fixtures` method in testcase by **[iRipVanWinkle](https://github.com/iRipVanWinkle)**. See [#3565](https://github.com/Codeception/Codeception/issues/3565)
31+
* **[MongoDb]** Added support for [mongofill](https://github.com/mongofill/mongofill), an alternative Mongo client in pure PHP. By **[hlogeon](https://github.com/hlogeon)** at [#3641](https://github.com/Codeception/Codeception/issues/3641)
32+
* **[MongoDb]** Fixed data import using mongotype dump type by **[hlogeon](https://github.com/hlogeon)** [#3637](https://github.com/Codeception/Codeception/issues/3637)
33+
* Fixed [#3392](https://github.com/Codeception/Codeception/issues/3392) by normalizing namespace loading classes in DI getterby **[Mitrichius](https://github.com/Mitrichius)** at [#3633](https://github.com/Codeception/Codeception/issues/3633)
34+
* **[Symfony]** Fixed [#3608](https://github.com/Codeception/Codeception/issues/3608) `[PHPUnit_Framework_Exception] implode()` while printing debug for security roles by **[Prazmok](https://github.com/Prazmok)**.
35+
* **[Yii1]** Fix domain regex [#3581](https://github.com/Codeception/Codeception/issues/3581) to return correct value by **[amashigeseiji](https://github.com/amashigeseiji)** See [#3597](https://github.com/Codeception/Codeception/issues/3597)
36+
* **[WebDriver]** Improved tests stability when Selenium server is gone [#3534](https://github.com/Codeception/Codeception/issues/3534) by **[eXorus](https://github.com/eXorus)**. Fixes [#3531](https://github.com/Codeception/Codeception/issues/3531)
37+
* **[WebDriver]** Tests are errored when Selenium server can't be connected. See [#3603](https://github.com/Codeception/Codeception/issues/3603)
38+
* MetaSteps are printed even with disabled xdebug by **[niclopez](https://github.com/niclopez)**. See [#3600](https://github.com/Codeception/Codeception/issues/3600)
39+
* **[WebDriver]** submit button in `submitForm` can be located by name or strict locator by **[imjoehaines](https://github.com/imjoehaines)**. See [#3560](https://github.com/Codeception/Codeception/issues/3560)
40+
* [SOAP][REST] removed module conflict by **[eXorus](https://github.com/eXorus)**.
41+
* Fixed [#3571](https://github.com/Codeception/Codeception/issues/3571): error handler to call `registerDeprecationErrorHandler` method and `register_shutdown_function` on first SuiteEvent only. By **[positronium](https://github.com/positronium)**. See [#3572](https://github.com/Codeception/Codeception/issues/3572)
42+
43+
#### 2.2.5 (September 2016)
1144

1245
* Support for PhpUnit 5.x.
13-
* **[Lumen]** Major refactoring of Lumen module. See [#3533](https://github.com/Codeception/Codeception/pull/3533). By **[janhenkgerritsen](https://github.com/janhenkgerritsen)**
46+
* **[Lumen]** Major refactoring of Lumen module. See [#3533](https://github.com/Codeception/Codeception/issues/3533). By **[janhenkgerritsen](https://github.com/janhenkgerritsen)**
1447
* **[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)**
1548
* **[Memcache]** Updated `Memcache::seeInMemcached` to check if the key exists alone or with the desired value. By **[sergeyklay](https://github.com/sergeyklay)**
1649
* **[Memcache]** Added `Memcache::haveInMemcached`. By **[sergeyklay](https://github.com/sergeyklay)**
1750
* **[Memcache]** Fixed `Memcache::dontSeeInMemcached`. By **[sergeyklay](https://github.com/sergeyklay)**
1851
* **[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)**
1952
* **[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)
2053
* **[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/Codeception/Codeception/issues/3287)**. By **[amashigeseiji](https://github.com/amashigeseiji)**
54+
* **[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)**
2255
* 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)
2356
* Fixed [#3410](https://github.com/Codeception/Codeception/issues/3410): Wrong subSteps rendering in HTML ResultPrinter by **[niclopez](https://github.com/niclopez)**
2457
* **[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)
@@ -37,7 +70,7 @@ title: Codeception Changelog
3770
* 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
3871
* 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)**.
3972

40-
#### 2.2.4
73+
#### 2.2.4 (August 2016)
4174

4275
* Improved using complex params, nested params can be set using dot (`.`). See [#3339](https://github.com/Codeception/Codeception/issues/3339)
4376
* **[Yii2]** Mailer mock is now configured with options that make sense for it. Fixes [#3382](https://github.com/Codeception/Codeception/issues/3382)
@@ -56,7 +89,7 @@ title: Codeception Changelog
5689
* **[Db]** Error is thrown if SQLite memory is used. [#3319](https://github.com/Codeception/Codeception/issues/3319)
5790
* **[Frameworks]** `REQUEST_TIME` server variable to be set on request. By **[gimler](https://github.com/gimler)**. Fixes [#3374](https://github.com/Codeception/Codeception/issues/3374)
5891

59-
#### 2.2.3
92+
#### 2.2.3 (July 2016)
6093

6194
* **[Yii2]** Improvements:
6295
* Added `init` part to initialize Yii app for unit and acceptance testing.

docs/02-GettingStarted.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ I see 'Hello, davert'
104104

105105
{% endhighlight %}
106106

107-
Codeception generate this text represenation from PHP code by executing:
107+
Codeception generates this text representation from PHP code by executing:
108108

109109
{% highlight bash %}
110110

@@ -127,15 +127,15 @@ modules:
127127

128128
{% endhighlight %}
129129

130-
After we configured the URL we can run this test with the `run` command:
130+
After configuring the URL we can run this test with the `run` command:
131131

132132
{% highlight bash %}
133133

134134
php codecept run
135135

136136
{% endhighlight %}
137137

138-
Here is the output we should see:
138+
This is the output we should see:
139139

140140
{% highlight bash %}
141141

@@ -182,8 +182,7 @@ OK (1 test, 1 assertions)
182182

183183
{% endhighlight %}
184184

185-
This simple test can be extended to a complete scenario of site usage.
186-
So by emulating the user's actions you can test any of your websites.
185+
This simple test can be extended to a complete scenario of site usage therefore, by emulating the user's actions, you can test any of your websites.
187186

188187
Give it a try!
189188

docs/05-UnitTests.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,22 @@ php codecept generate:test unit Example
3737

3838
Both tests will create a new `ExampleTest` file located in `tests/unit` directory.
3939

40+
As always, you can run the just created test with this command:
41+
42+
{% highlight bash %}
43+
44+
php codecept run unit ExampleTest
45+
46+
{% endhighlight %}
47+
48+
or simply run the whole set of unit tests with this:
49+
50+
{% highlight bash %}
51+
52+
php codecept run unit
53+
54+
{% endhighlight %}
55+
4056
A test created by `generate:test` command will look like this:
4157

4258
{% highlight php %}

docs/08-Customization.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,14 @@ php codecept run
6868
6969
This will launch test suites for all 3 applications and merge the reports from all of them. Basically that would be very useful when you run your tests on Continuous Integration server and you want to get one report in JUnit and HTML format. Codecoverage report will be merged too.
7070
71-
If your applications uses same helpers, follow the next section of this chapter.
71+
If you want to run specific suite from application you can execute:
72+
73+
{% highlight php %}
74+
codecept run unit -c frontend
75+
76+
{% endhighlight %}
77+
Where `unit` is the name of suite and with `-c` you can specify path to `codeception.yml` config to use. In this example we assume that there is `frontend/codeception.yml` config and we execute unit tests only for that app.
78+
7279
7380
## Extension
7481

docs/modules/AngularJS.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,6 +1488,26 @@ $I->submitForm('#my-form', [
14881488
]);
14891489

14901490
{% endhighlight %}
1491+
1492+
The `$button` parameter can be either a string, an array or an instance
1493+
of Facebook\WebDriver\WebDriverBy. When it is a string, the
1494+
button will be found by its "name" attribute. If $button is an
1495+
array then it will be treated as a strict selector and a WebDriverBy
1496+
will be used verbatim.
1497+
1498+
For example, given the following HTML:
1499+
1500+
{% highlight html %}
1501+
1502+
<input type="submit" name="submitButton" value="Submit" />
1503+
1504+
{% endhighlight %}
1505+
1506+
`$button` could be any one of the following:
1507+
- 'submitButton'
1508+
- ['name' => 'submitButton']
1509+
- WebDriverBy::name('submitButton')
1510+
14911511
* `param` $selector
14921512
* `param` $params
14931513
* `param` $button

docs/modules/Apc.md

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
---
2+
layout: doc
3+
title: Apc - Codeception - Documentation
4+
---
5+
6+
7+
8+
<div class="btn-group" role="group" style="float: right" aria-label="..."><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/2.2/src/Codeception/Module/Apc.php">source</a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/master/docs/modules/Apc.md">master</a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/2.2/docs/modules/Apc.md"><strong>2.2</strong></a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/2.1/docs/modules/Apc.md">2.1</a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/2.0/docs/modules/Apc.md">2.0</a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/1.8/docs/modules/Apc.md">1.8</a></div>
9+
10+
# Apc
11+
12+
13+
This module interacts with the [Alternative PHP Cache (APC)](http://php.net/manual/en/intro.apcu.php)
14+
using either _APCu_ or _APC_ extension.
15+
16+
Performs a cleanup by flushing all values after each test run.
17+
18+
### Status
19+
20+
* Maintainer: **Serghei Iakovlev**
21+
* Stability: **stable**
22+
* Contact: serghei@phalconphp.com
23+
24+
#### Example (`unit.suite.yml`)
25+
26+
{% highlight yaml %}
27+
28+
modules:
29+
- Apc
30+
31+
{% endhighlight %}
32+
33+
Be sure you don't use the production server to connect.
34+
35+
36+
37+
### Actions
38+
39+
#### dontSeeInApc
40+
41+
Checks item in APC(u) doesn't exist or is the same as expected.
42+
43+
Examples:
44+
45+
{% highlight php %}
46+
47+
<?php
48+
// With only one argument, only checks the key does not exist
49+
$I->dontSeeInApc('users_count');
50+
51+
// Checks a 'users_count' exists does not exist or its value is not the one provided
52+
$I->dontSeeInApc('users_count', 200);
53+
?>
54+
55+
{% endhighlight %}
56+
57+
* `param string|string[]` $key
58+
* `param mixed` $value
59+
60+
61+
#### flushApc
62+
63+
Clears the APC(u) cache
64+
65+
66+
#### grabValueFromApc
67+
68+
Grabs value from APC(u) by key.
69+
70+
Example:
71+
72+
{% highlight php %}
73+
74+
<?php
75+
$users_count = $I->grabValueFromApc('users_count');
76+
?>
77+
78+
{% endhighlight %}
79+
80+
* `param string|string[]` $key
81+
82+
83+
#### haveInApc
84+
85+
Stores an item `$value` with `$key` on the APC(u).
86+
87+
Examples:
88+
89+
{% highlight php %}
90+
91+
<?php
92+
// Array
93+
$I->haveInApc('users', ['name' => 'miles', 'email' => 'miles * `davis.com']);`
94+
95+
// Object
96+
$I->haveInApc('user', UserRepository::findFirst());
97+
98+
// Key as array of 'key => value'
99+
$entries = [];
100+
$entries['key1'] = 'value1';
101+
$entries['key2'] = 'value2';
102+
$entries['key3'] = ['value3a','value3b'];
103+
$entries['key4'] = 4;
104+
$I->haveInApc($entries, null);
105+
?>
106+
107+
{% endhighlight %}
108+
109+
* `param string|array` $key
110+
* `param mixed` $value
111+
* `param int` $expiration
112+
113+
114+
#### seeInApc
115+
116+
Checks item in APC(u) exists and the same as expected.
117+
118+
Examples:
119+
120+
{% highlight php %}
121+
122+
<?php
123+
// With only one argument, only checks the key exists
124+
$I->seeInApc('users_count');
125+
126+
// Checks a 'users_count' exists and has the value 200
127+
$I->seeInApc('users_count', 200);
128+
?>
129+
130+
{% endhighlight %}
131+
132+
* `param string|string[]` $key
133+
* `param mixed` $value
134+
135+
<p>&nbsp;</p><div class="alert alert-warning">Module reference is taken from the source code. <a href="https://github.com/Codeception/Codeception/tree/2.2/src/Codeception/Module/Apc.php">Help us to improve documentation. Edit module reference</a></div>

0 commit comments

Comments
 (0)