Skip to content

Commit e3376fd

Browse files
committed
auto updated documentation
1 parent 3f5b580 commit e3376fd

File tree

9 files changed

+145
-14
lines changed

9 files changed

+145
-14
lines changed

changelog.markdown

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,25 @@ title: Codeception Changelog
77

88
# Changelog
99

10+
#### 2.1.7
11+
12+
* **PHPUnit 5.x support**
13+
* Global Bootstrap, Suite Bootstrap, Module Initialization happens before test loading. Fixes issues of autoloading TestCase classes introduced in 2.1.5, see <a href="https://github.com/Codeception/Codeception/issues/2872">#2872</a>
14+
* Added option to skip PHP files validation in `codeception.yml` - `settings: lint: false`
15+
* <strong>[Facebook]</strong> Updated to facebook/php-sdk-v4 version 5 by <strong><a href="https://github.com/orhan">@orhan</a></strong>-swe and <strong><a href="https://github.com/tigerseo">@tigerseo</a></strong> <a href="https://github.com/Codeception/Codeception/issues/2828">#2828</a> <a href="https://github.com/Codeception/Codeception/issues/2415">#2415</a>
16+
* <strong>[WebDriver]</strong> Added `scrollTo` action by <strong><a href="https://github.com/javigomez">@javigomez</a></strong> and <strong><a href="https://github.com/davertmik">@davertmik</a></strong> <a href="https://github.com/Codeception/Codeception/issues/2844">#2844</a>
17+
* Fix encoding problems in PHP prior to 5.6 by <strong><a href="https://github.com/pejaycz">@pejaycz</a></strong>. See <a href="https://github.com/Codeception/Codeception/issues/2831">#2831</a>
18+
* <strong>[Queue]</strong> Fixed `clearQueue` for AmazonSQS by <strong><a href="https://github.com/mikitu">@mikitu</a></strong> <a href="https://github.com/Codeception/Codeception/issues/2805">#2805</a>
19+
* <strong>[Db]</strong> Fixed loading files in Sqlite <strong><a href="https://github.com/mcustiel">@mcustiel</a></strong> See <a href="https://github.com/Codeception/Codeception/issues/2812">#2812</a>
20+
* <strong>[PhpBrowser]</strong> `amHttpAuthenticated` allows null, null as parameters to unset authentication. <a href="https://github.com/Codeception/Codeception/issues/2896">#2896</a>
21+
* `Util\Locator` added `contains` method to easily locate any element containing a text.
22+
* <strong>[Laravel5]</strong> Added `guard` parameters to `seeAuthentication` and `dontSeeAuthentication` methods. By <strong><a href="https://github.com/janhenkgerritsen">@janhenkgerritsen</a></strong>. See <a href="https://github.com/Codeception/Codeception/issues/2876">#2876</a>
23+
* <strong>[Laravel5]</strong> Added functionality to disable/enable Laravel's exception handling. By <strong><a href="https://github.com/janhenkgerritsen">@janhenkgerritsen</a></strong>. See <a href="https://github.com/Codeception/Codeception/issues/2763">#2763</a>
24+
* <strong>[Laravel5]</strong> Authentication now persists between requests when calling `amLoggedAs` with an instance of `Authenticable`. See <a href="https://github.com/Codeception/Codeception/issues/2795">#2795</a>
25+
* <strong>[REST]</strong> Fixed dontSeeXmlResponseMatchesXpath method <a href="https://github.com/Codeception/Codeception/issues/2825">#2825</a> by <strong><a href="https://github.com/mangust404">@mangust404</a></strong>
26+
* <strong>[ZF2]</strong> Fixed POST parameters <a href="https://github.com/Codeception/Codeception/issues/2814">#2814</a> by <strong><a href="https://github.com/Naktibalda">@Naktibalda</a></strong>
27+
* <strong>[ZF1]</strong> Call Zend_Registry::_unsetInstance in _after <a href="https://github.com/Codeception/Codeception/issues/2863">#2863</a> by <strong><a href="https://github.com/Naktibalda">@Naktibalda</a></strong>
28+
1029
#### 2.1.6
1130

1231
* Starting from 2.1.6 you can **download PHP 5.4 compatible phar build** at http://codeception.com/php54/codecept.phar by <strong><a href="https://github.com/Naktibalda">@Naktibalda</a></strong>. See [installation guide](http://codeception.com/install).
@@ -29,8 +48,6 @@ title: Codeception Changelog
2948
* <strong>[REST]</strong> Added methods to control redirect: `stopFollowingRedirects` and `startFollowingRedirects` by <strong><a href="https://github.com/brutuscat">@brutuscat</a></strong>
3049
* [Recorder Extension] Added `animate_slides` config to disable left-right sliding animation between screenshots by <strong><a href="https://github.com/vml">@vml</a></strong>-rmott
3150

32-
33-
3451
#### 2.1.5
3552

3653
* **PHP7 support**
@@ -61,7 +78,6 @@ title: Codeception Changelog
6178
* <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>
6279
* 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>
6380

64-
6581
#### 2.1.4
6682

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

docs/11-Codecoverage.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Just for this case the [CodeCoverage](http://en.wikipedia.org/wiki/Code_coverage
1010
you will receive statistics of all classes, methods, and lines triggered by these tests.
1111
The ratio between all lines in script and all touched lines is a main coverage criterion. In the ideal world you should get 100% code coverage, but in reality 80% is really enough. Because even 100% code coverage rate doesn't save you from fatal errors and crashes.
1212

13-
**Codeception has CodeCoverage tools since 1.5. To collect coverage information `xdebug` is required**.
13+
*To collect coverage information `xdebug` is required**.
1414

1515
![Code Coverage Example](http://codeception.com/images/coverage.png)
1616

@@ -19,7 +19,7 @@ or locally but running through web server. It may look hard to collect code cove
1919

2020
### Configuration
2121

22-
To enable codecoverge put these lines in the global configuration file `codeception.yml`:
22+
To enable code coverage put these lines in the global configuration file `codeception.yml`:
2323

2424
{% highlight yaml %}
2525

@@ -52,6 +52,9 @@ What are whitelists and blacklists?
5252
* A **whitelist** is a list of files that should be included in report even they were not touched.
5353
* A **blacklist** is a list of files that should be excluded from report even they were touched.
5454

55+
<div class="alert alert-info">
56+
The blacklist functionality has been removed from PHPUnit 5, but it can still be used with PHPUnit 4.8.
57+
</div>
5558
Pass an array of files or directory to include/exclude sections. The path ending with '\*' matches the directory.
5659
Also you can use '\*' mask in a file name, i.e. `app/models/*Model.php` to match all models.
5760

docs/modules/AMQP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ To use this module with Composer you need <em>"videlalvaro/php-amqplib": "*"</em
4949

5050
### Public Properties
5151

52-
* connection - AMQPConnection - current connection
52+
* connection - AMQPStreamConnection - current connection
5353

5454
@since 1.1.2
5555
@author tiger.seo@gmail.com

docs/modules/Facebook.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Provides testing for projects integrated with Facebook API.
1414
Relies on Facebook's tool Test User API.
1515

1616
<div class="alert alert-info">
17-
To use this module with Composer you need <em>"facebook/php-sdk": "3.*"</em> package.
17+
To use this module with Composer you need <em>"facebook/php-sdk4": "5.*"</em> package.
1818
</div>
1919

2020
### Status
@@ -135,6 +135,7 @@ Get facebook test user be created.
135135
#### haveTestUserLoggedInOnFacebook
136136

137137
Get facebook test user be logged in on facebook.
138+
This is done by going to facebook.com
138139

139140
* `throws` ModuleConfigException
140141

@@ -153,4 +154,12 @@ Please, note that you must have publish_actions permission to be able to publish
153154

154155
* `param string` $placeId Place identifier to be verified against user published posts
155156

157+
158+
#### seePostOnFacebookWithMessage
159+
160+
161+
Please, note that you must have publish_actions permission to be able to publish to user's feed.
162+
163+
* `param string` $message published post to be verified against the actual post on facebook
164+
156165
<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.1/src/Codeception/Module/Facebook.php">Help us to improve documentation. Edit module reference</a></div>

docs/modules/Laravel5.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ See the Acceptance tests section below for more details.
3737
* bootstrap: `string`, default `bootstrap/app.php` - Relative path to app.php config file.
3838
* root: `string`, default `` - Root path of our application.
3939
* packages: `string`, default `workbench` - Root path of application packages (if any).
40+
* disable_exception_handling: `boolean`, default `true` - disable Laravel exception handling
4041
* disable_middleware: `boolean`, default `false` - disable all middleware.
4142
* disable_events: `boolean`, default `false` - disable all events.
4243
* url: `string`, default `` - The application URL.
@@ -376,6 +377,19 @@ $I->disableEvents();
376377
{% endhighlight %}
377378

378379

380+
#### disableExceptionHandling
381+
382+
Disable Laravel exception handling.
383+
384+
{% highlight php %}
385+
386+
<?php
387+
$I->disableExceptionHandling();
388+
?>
389+
390+
{% endhighlight %}
391+
392+
379393
#### disableMiddleware
380394

381395
Disable middleware for the next requests.
@@ -423,7 +437,9 @@ For checking the raw source code, use `seeInSource()`.
423437

424438
#### dontSeeAuthentication
425439

426-
Check that user is not authenticated
440+
Check that user is not authenticated.
441+
You can specify the guard that should be use for Laravel >= 5.2.
442+
* `param string|null` $guard
427443

428444

429445
#### dontSeeCheckboxIsChecked
@@ -698,6 +714,19 @@ $I->dontSeeRecord('users', array('name' => 'davert'));
698714
* `[Part]` orm
699715

700716

717+
#### enableExceptionHandling
718+
719+
Enable Laravel exception handling.
720+
721+
{% highlight php %}
722+
723+
<?php
724+
$I->enableExceptionHandling();
725+
?>
726+
727+
{% endhighlight %}
728+
729+
701730
#### fillField
702731

703732
Fills a text field or textarea with the given string.
@@ -969,7 +998,9 @@ For checking the raw source code, use `seeInSource()`.
969998

970999
#### seeAuthentication
9711000

972-
Checks that a user is authenticated
1001+
Checks that a user is authenticated.
1002+
You can specify the guard that should be use for Laravel >= 5.2.
1003+
* `param string|null` $guard
9731004

9741005

9751006
#### seeCheckboxIsChecked

docs/modules/Queue.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,22 @@ service.
5151
* project - Iron.io project ID.
5252
* key - AWS access key ID.
5353
* secret - AWS secret access key.
54+
Warning:
55+
Hard-coding your credentials can be dangerous, because it is easy to accidentally commit your credentials
56+
into an SCM repository, potentially exposing your credentials to more people than intended.
57+
It can also make it difficult to rotate credentials in the future.
58+
* profile - AWS credential profile
59+
- it should be located in ~/.aws/credentials file
60+
- eg: [default]
61+
aws_access_key_id = YOUR_AWS_ACCESS_KEY_ID
62+
aws_secret_access_key = YOUR_AWS_SECRET_ACCESS_KEY
63+
[project1]
64+
aws_access_key_id = YOUR_AWS_ACCESS_KEY_ID
65+
aws_secret_access_key = YOUR_AWS_SECRET_ACCESS_KEY
66+
- Note: Using IAM roles is the preferred technique for providing credentials
67+
to applications running on Amazon EC2
68+
http://docs.aws.amazon.com/aws-sdk-php/v3/guide/guide/credentials.html?highlight=credentials
69+
5470
* region - A region parameter is also required for AWS, refer to the AWS documentation for possible values list.
5571

5672
#### Example
@@ -87,6 +103,25 @@ service.
87103
'secret' => 'your-secret-key',
88104
'region' => 'us-west-2'
89105

106+
##### Example AWS SQS using profile credentials
107+
108+
modules:
109+
enabled: [Queue]
110+
config:
111+
Queue:
112+
'type' => 'aws',
113+
'profile' => 'project1', //see documentation
114+
'region' => 'us-west-2'
115+
116+
##### Example AWS SQS running on Anazon EC2 instance
117+
118+
modules:
119+
enabled: [Queue]
120+
config:
121+
Queue:
122+
'type' => 'aws',
123+
'region' => 'us-west-2'
124+
90125

91126

92127
#### addMessageToQueue

docs/modules/REST.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ Basic example:
481481

482482
<?php
483483
// {'user_id': 1, 'name': 'davert', 'is_active': false}
484-
$I->seeResponseIsJsonType([
484+
$I->seeResponseMatchesJsonType([
485485
'user_id' => 'integer',
486486
'name' => 'string|null',
487487
'is_active' => 'boolean'
@@ -509,7 +509,7 @@ You can also use nested data type structures:
509509

510510
<?php
511511
// {'user_id': 1, 'name': 'davert', 'company': {'name': 'Codegyre'}}
512-
$I->seeResponseIsJsonType([
512+
$I->seeResponseMatchesJsonType([
513513
'user_id' => 'integer|string', // multiple types
514514
'company' => ['name' => 'string']
515515
]);
@@ -534,13 +534,13 @@ This is how filters can be used:
534534

535535
<?php
536536
// {'user_id': 1, 'email' => 'davert * `codeception.com'}`
537-
$I->seeResponseIsJsonType([
537+
$I->seeResponseMatchesJsonType([
538538
'user_id' => 'string:>0:<1000', // multiple filters can be used
539539
'email' => 'string:regex(~\ * `~)'` // we just check that * `` char is included
540540
]);
541541

542542
// {'user_id': '1'}
543-
$I->seeResponseIsJsonType([
543+
$I->seeResponseMatchesJsonType([
544544
'user_id' => 'string:>0', // works with strings as well
545545
}
546546
?>
@@ -553,6 +553,7 @@ See [JsonType reference](http://codeception.com/docs/reference/JsonType).
553553
* `[Part]` json
554554
* `Available since` 2.1.3
555555
* `param array` $jsonType
556+
* `param string` $jsonPath
556557

557558

558559
#### seeXmlResponseEquals

docs/modules/WebDriver.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,24 @@ $I->resizeWindow(800, 600);
10271027
* `param string` $name
10281028

10291029

1030+
#### scrollTo
1031+
1032+
Move to the middle of the given element matched by the given locator.
1033+
Extra shift, calculated from the top-left corner of the element, can be set by passing $offsetX and $offsetY parameters.
1034+
1035+
{% highlight php %}
1036+
1037+
<?php
1038+
$I->scrollTo(['css' => '.checkout'], 20, 50);
1039+
?>
1040+
1041+
{% endhighlight %}
1042+
1043+
* `param` $selector
1044+
* `param int` $offsetX
1045+
* `param int` $offsetY
1046+
1047+
10301048
#### see
10311049

10321050
Checks that the current page contains the given string (case insensitive).

docs/reference/Locator.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,24 @@ As a result the Locator will produce a mixed XPath value that will be used in fi
5050

5151
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Locator.php#L45)
5252

53+
#### *public static* contains($element, $text)
54+
55+
Locates an element containing a text inside.
56+
Either CSS or XPath locator can be passed, however they will be converted to XPath.
57+
58+
{% highlight php %}
59+
60+
Locator::contains('label', 'Name'); // label containing name
61+
Locator::contains('div[ * `contenteditable=true]',` 'hello world');
62+
63+
{% endhighlight %}
64+
65+
* `param` $element
66+
* `param` $text
67+
* `return` string
68+
69+
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Locator.php#L198)
70+
5371
#### *public static* find($element, array $attributes)
5472

5573
Finds element by it's attribute(s)
@@ -85,7 +103,7 @@ $I->see('Log In', Locator::href('/login.php'));
85103

86104
#### *public static* humanReadableString($selector)
87105

88-
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Locator.php#L185)
106+
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Locator.php#L204)
89107

90108
#### *public static* isCSS($selector)
91109

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