Skip to content

Commit 67c39c9

Browse files
committed
merged
2 parents 2803ce5 + 85f24e5 commit 67c39c9

21 files changed

+390
-260
lines changed

_layouts/doc.html

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,26 @@
33
---
44

55
<div class="row">
6-
<div class="col-sm-3 col-lg-3">
6+
<div class="col-sm-8 col-lg-8">
7+
<div class="content page">
8+
<div>
9+
10+
<div id="page">
11+
{{ content }}
12+
</div>
13+
</div>
14+
15+
</div>
16+
</div>
17+
<div class="col-sm-4 col-lg-4">
718

819
<div id="searchable">
920
<input type="search" class="search" placeholder="live search...">
1021
<br>
1122
<!-- toc.js generated nav... -->
1223
<div id="toc" class="nav"></div>
1324
</div> <!-- /#searchable -->
25+
1426
<script type="text/javascript">
1527
$(document).ready(function () {
1628
$('#toc').toc({
@@ -22,7 +34,6 @@
2234
return $(heading).text().replace(/\s/g, '-').replace(/[^\w-]/g, '');
2335
},
2436
});
25-
2637
// List.js
2738
$('#toc > ul').addClass('list');
2839
$('#toc ul.list li a').addClass('searchitem');
@@ -36,18 +47,4 @@
3647
</script>
3748

3849
</div>
39-
40-
<div class="col-sm-9 col-lg-9">
41-
<div class="content page">
42-
<div>
43-
44-
<div id="page">
45-
{{ content }}
46-
</div>
47-
</div>
48-
49-
</div>
50-
</div>
51-
52-
5350
</div>

_layouts/post.html

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
---
22
layout: page
33
---
4-
5-
64
<h1>{{ page.title }}</h1>
7-
8-
<p>
9-
<div class="badge">Published on {{ page.date | date: "%B %d, %Y" }}</div>
5+
<p class="lead">
6+
Published on {{ page.date | date: "%B %d, %Y" }}
107
</p>
11-
128
{{ content }}
13-
149
<div class="alert alert-info">
10+
<a href="http://www.reddit.com/submit" onclick="window.location = 'http://www.reddit.com/submit?url=' + encodeURIComponent(window.location); return false" style="float: right"><img src="http://www.reddit.com/static/spreddit7.gif" alt="submit to reddit" border="0" /></a>
11+
<!-- Розмістіть цей тег там, де необхідно розмістити кнопку +1 -->
12+
<g:plusone size="tall" annotation="inline"></g:plusone>
13+
<a href="https://twitter.com/share" class="twitter-share-button" data-via="codeception">Tweet</a>
14+
</div> <!-- /.alert -->
1515

16-
<a href="http://www.reddit.com/submit" onclick="window.location = 'http://www.reddit.com/submit?url=' + encodeURIComponent(window.location); return false" style="float: right"><img src="http://www.reddit.com/static/spreddit7.gif" alt="submit to reddit" border="0" /></a>
17-
18-
<!-- Розмістіть цей тег там, де необхідно розмістити кнопку +1 -->
19-
<g:plusone size="tall" annotation="inline"></g:plusone>
20-
<a href="https://twitter.com/share" class="twitter-share-button" data-via="codeception">Tweet</a>
2116
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
2217

2318
<!-- Розмістіть цю команду відображення в потрібному місці -->
@@ -27,7 +22,5 @@ <h1>{{ page.title }}</h1>
2722
po.src = 'https://apis.google.com/js/plusone.js';
2823
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
2924
})();
30-
</script>
31-
</div>
32-
25+
</script>
3326
{% include comment.html %}

_posts/2016-03-11-even-more-features-of-codeception.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ And yes, examples work only in Cests.
9797

9898
### Custom Commands
9999

100-
Long requested feature that finally was implemented by [Tobias Matthaiou](https://github.com/sd-tm) allows you ro register custom commands to Codeception runner.
100+
Long requested feature that finally was implemented by [Tobias Matthaiou](https://github.com/sd-tm) allows you to register custom commands to Codeception runner.
101101

102102
If you ever created Symfony Console commands you will be familiar in creating custom commands for Codeception. You migth probably use to have your own template generators, perform data migrations, etc. You can register one as simple as you do it for extension:
103103

@@ -135,4 +135,4 @@ if (isset($capabilities['platform'])) {
135135
---
136136

137137
That's all for today, but not for Codeception 2.2
138-
The most important and most impressive feature is waiting for you in next post. Subscribe to our [Twitter](http://twitter.com/codeception) to not miss it. Stay tuned!
138+
The most important and most impressive feature is waiting for you in next post. Subscribe to our [Twitter](http://twitter.com/codeception) to not miss it. Stay tuned!

addons.markdown

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ You can access multiple test suites and decide which tests to include in a run.
1919

2020
## Modules
2121

22+
#### [Amazon S3 Filesystem](https://github.com/polevaultweb/s3-filesystem)
23+
24+
An Amazon S3 Filesystem module.
25+
2226
#### [CakePHP](https://github.com/cakephp/codeception)
2327

2428
Official CakePHP 3 module for Codeception.
@@ -92,6 +96,10 @@ Extension for starting and stopping built-in PHP server. Works on Windows, Mac,
9296

9397
Extension for automatically starting and stopping PhantomJS when running tests.
9498

99+
#### [MultiDb](https://github.com/redmatter/Codeception-MultiDb)
100+
101+
Extension that enables working with multiple dabatase backends and safe switching between them. It provides equivalant service as the Db module and more. Use v1.x for codeception v2.0 and v2.x for codeception v2.1.
102+
95103
#### [DrushDb](https://github.com/pfaocle/DrushDb)
96104

97105
DrushDb is a Codeception extension to populate and cleanup test **Drupal** sites during test runs using Drush aliases and the sql-sync command.
@@ -120,6 +128,14 @@ TestStatistics is a Codeception Extension to measure the performance of your tes
120128

121129
Integration with TeamCity CI server by service-messages
122130

131+
#### [EventsScripting](https://github.com/oprudkyi/codeception-events-scripting)
132+
133+
Run shell scripts on events - before/after suites/environments/full test run
134+
135+
#### [GherkinParam](https://github.com/edno/codeception-gherkin-param)
136+
137+
The Codeception extension for supporting parameter notation in Gherkin scenario.
138+
123139
---
124140

125141
## IDE Plugins

builds.markdown

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ title: Codeception Builds
77
## 2.1
88
*Requires: PHP 5.4 and higher + CURL*
99

10-
* **[Download Latest 2.1 Release](http://codeception.com/releases/2.1.7/codecept.phar)**
11-
* [2.1.7](http://codeception.com/releases/2.1.7/codecept.phar), [for PHP 5.4](http://codeception.com/releases/2.1.7/php54/codecept.phar)
12-
* [2.1.6](http://codeception.com/releases/2.1.6/codecept.phar), [for PHP 5.4](http://codeception.com/releases/2.1.6/php54/codecept.phar)
10+
* **[Download Latest 2.1 Release](http://codeception.com/releases/2.1.8/codecept.phar)**
11+
* [2.1.8](http://codeception.com/releases/2.1.8/codecept.phar), [for PHP 5.4 or 5.5](http://codeception.com/releases/2.1.8/php54/codecept.phar)
12+
* [2.1.7](http://codeception.com/releases/2.1.7/codecept.phar), [for PHP 5.4 or 5.5](http://codeception.com/releases/2.1.7/php54/codecept.phar)
13+
* [2.1.6](http://codeception.com/releases/2.1.6/codecept.phar), [for PHP 5.4 or 5.5](http://codeception.com/releases/2.1.6/php54/codecept.phar)
1314
* [2.1.5](http://codeception.com/releases/2.1.5/codecept.phar)
1415
* [2.1.4](http://codeception.com/releases/2.1.4/codecept.phar)
1516
* [2.1.3](http://codeception.com/releases/2.1.3/codecept.phar)

changelog.markdown

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

88
# Changelog
99

10+
#### 2.1.8
11+
12+
* `Util\Locator` added methods to create locators to match element at their position: `elementAt`, `firstElement`, `lastElement`
13+
* <strong>[Symfony]</strong> Refactor to unify service retrieval, avoid memleaks and reduce memory footprint. Closes <a href="https://github.com/Codeception/Codeception/issues/2938">#2938</a> and <a href="https://github.com/Codeception/Codeception/issues/2954">#2954</a>.
14+
* <strong>[Symfony]</strong> New optoin `rebootable_client` that reboots client's kernel before each request.
15+
* <strong>[WebDriver]</strong> fixed `seeInField` for textarea with whitespaces before and after string. Closes <a href="https://github.com/Codeception/Codeception/issues/2921">#2921</a>
16+
* <strong>[Symfony]</strong> Deprecated `grabServiceFromContainer` use `grabService` instead. For consistency with other frameworks.
17+
* <strong>[Asserts]</strong> More `assert*` methods from PHPUnit added
18+
* <strong>[Asserts]</strong> Added `expectException` method
19+
* `codecept self-update` works with proxy by <strong><a href="https://github.com/gr1ev0us">@gr1ev0us</a></strong>
20+
* [Phalcon1 add params support for method amOnRoute by <strong><a href="https://github.com/MelnykDmitro">@MelnykDmitro</a></strong>
21+
1022
#### 2.1.7
1123

1224
* **PHPUnit 5.x support**

codecept.phar

57.9 KB
Binary file not shown.

docs/05-UnitTests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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 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.
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.
379379
</div>
380380

381381

docs/06-ReusingTestCode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ However, implementing all actions for a reuse in one actor class may lead to bre
117117
## StepObjects
118118

119119
If `login` method defined in Actor class may be used in 90% of your tests,
120-
StepObjects are great if you need some common functionality for a group of tests. Let's say you are going to test and 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.
120+
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.
121121

122122
Lets create an Admin StepObject with generator, by specifying test suite, and passing method expected names on prompt.
123123

@@ -217,7 +217,7 @@ If you have complex interaction scenario you may use several step objects in one
217217
## PageObjects
218218

219219
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-
[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.
220+
[PageObject pattern](http://docs.seleniumhq.org/docs/06_test_design_considerations.jsp#page-object-design-pattern), 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

223223
Codeception can generate a PageObject class for you with command:

docs/modules/Asserts.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,20 @@ title: Asserts - Codeception - Documentation
1313
Special module for using asserts in your tests.
1414

1515

16+
#### assertArrayHasKey
17+
18+
* `param` $key
19+
* `param` $actual
20+
* `param` $description
21+
22+
23+
#### assertArrayNotHasKey
24+
25+
* `param` $key
26+
* `param` $actual
27+
* `param` $description
28+
29+
1630
#### assertContains
1731

1832
Checks that haystack contains needle
@@ -63,6 +77,13 @@ Checks if file doesn't exist
6377
* `param string` $message
6478

6579

80+
#### assertGreaterOrEquals
81+
82+
* `param` $expected
83+
* `param` $actual
84+
* `param` $description
85+
86+
6687
#### assertGreaterThan
6788

6889
Checks that actual is greater than expected
@@ -91,6 +112,33 @@ Checks that actual is greater or equal than expected
91112
* `deprecated`
92113

93114

115+
#### assertInstanceOf
116+
117+
* `param` $class
118+
* `param` $actual
119+
* `param` $description
120+
121+
122+
#### assertInternalType
123+
124+
* `param` $type
125+
* `param` $actual
126+
* `param` $description
127+
128+
129+
#### assertIsEmpty
130+
131+
* `param` $actual
132+
* `param` $description
133+
134+
135+
#### assertLessOrEquals
136+
137+
* `param` $expected
138+
* `param` $actual
139+
* `param` $description
140+
141+
94142
#### assertLessThan
95143

96144
Checks that actual is less than expected
@@ -135,6 +183,13 @@ Checks that two variables are not equal
135183
* `param string` $message
136184

137185

186+
#### assertNotInstanceOf
187+
188+
* `param` $class
189+
* `param` $actual
190+
* `param` $description
191+
192+
138193
#### assertNotNull
139194

140195
Checks that variable is not NULL
@@ -185,6 +240,7 @@ Checks that two variables are same
185240
* `param` $expected
186241
* `param` $actual
187242
* `param string` $message
243+
* `return` mixed|void
188244

189245

190246
#### assertTrue
@@ -195,6 +251,38 @@ Checks that condition is positive.
195251
* `param string` $message
196252

197253

254+
#### expectException
255+
256+
Handles and checks exception called inside callback function.
257+
Either exception class name or exception instance should be provided.
258+
259+
{% highlight php %}
260+
261+
<?php
262+
$I->expectException(MyException::class, function() {
263+
$this->doSomethingBad();
264+
});
265+
266+
$I->expectException(new MyException(), function() {
267+
$this->doSomethingBad();
268+
});
269+
270+
{% endhighlight %}
271+
If you want to check message or exception code, you can pass them with exception instance:
272+
{% highlight php %}
273+
274+
<?php
275+
// will check that exception MyException is thrown with "Don't do bad things" message
276+
$I->expectException(new MyException("Don't do bad things"), function() {
277+
$this->doSomethingBad();
278+
});
279+
280+
{% endhighlight %}
281+
282+
* `param` $exception string or \Exception
283+
* `param` $callback
284+
285+
198286
#### fail
199287

200288
Fails the test with message.

docs/modules/SOAP.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ If you use PHP SoapServer with framework, try to block call to this method in te
3535

3636
### Public Properties
3737

38-
* request - last soap request (DOMDocument)
39-
* response - last soap response (DOMDocument)
38+
* xmlRequest - last SOAP request (DOMDocument)
39+
* xmlResponse - last SOAP response (DOMDocument)
4040

4141

4242

@@ -151,7 +151,6 @@ Example:
151151

152152
<?php
153153
154-
$I->seeResponseContains("<user><query>CreateUser<name>Davert</davert></user>");
155154
$I->seeSoapResponseContainsStructure("<query><name></name></query>");
156155
?>
157156

@@ -240,8 +239,8 @@ Example:
240239

241240
{% highlight php %}
242241

243-
$I->sendRequest('UpdateUser', '<user><id>1</id><name>notdavert</name></user>');
244-
$I->sendRequest('UpdateUser', \Codeception\Utils\Soap::request()->user
242+
$I->sendSoapRequest('UpdateUser', '<user><id>1</id><name>notdavert</name></user>');
243+
$I->sendSoapRequest('UpdateUser', \Codeception\Utils\Soap::request()->user
245244
->id->val(1)->parent()
246245
->name->val('notdavert');
247246

0 commit comments

Comments
 (0)