Skip to content

Commit a3f8452

Browse files
committed
auto updated documentation
1 parent db580c0 commit a3f8452

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

docs/06-ReusingTestCode.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ $I->seeFileFound('running.lock');
2727
It can operate with different entities: the web page can be loaded with the PhpBrowser module, the database assertion uses the Db module, and file state can be checked with the Filesystem module.
2828

2929
Modules are attached to Actor classes in the suite config.
30-
For example, in `tests/functional.suite.yml` we should see:
30+
For example, in `tests/acceptance.suite.yml` we should see:
3131

3232
{% highlight yaml %}
3333

@@ -41,7 +41,7 @@ modules:
4141

4242
{% endhighlight %}
4343

44-
The FunctionalTester class has its methods defined in modules. But let's see what's inside `AcceptanceTester` class, which is located inside `tests/_support` directory:
44+
The AcceptanceTester class has its methods defined in modules. But let's see what's inside `AcceptanceTester` class, which is located inside `tests/_support` directory:
4545

4646
{% highlight php %}
4747

@@ -345,7 +345,7 @@ class UserCest
345345

346346
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.
347347

348-
## Modules and Helpers
348+
## Helpers
349349

350350
In the examples above we only grouped actions into one. What happens when we need to create a custom action?
351351
In this case it's a good idea to define missing actions or assertion commands in custom modules, which are called Helpers. They can be found in the `tests/_support/Helper` directory.
@@ -479,10 +479,11 @@ function seeNumResults($num)
479479
{
480480
// retrieving webdriver session
481481
/**@var $table \Facebook\WebDriver\WebDriverElement */
482-
$table = $this->getModule('WebDriver')->_findElements('#result');
482+
$elements = $this->getModule('WebDriver')->_findElements('#result');
483+
$this->assertNotEmpty($elements);
484+
$table = reset($elements);
483485
$this->assertEquals('table', $table->getTagName());
484486
$results = $table->findElements('tr');
485-
486487
// asserting that table contains exactly $num rows
487488
$this->assertEquals($num, count($results));
488489
}

docs/modules/REST.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,11 +547,11 @@ $I->seeResponseIsJsonType([
547547
{% endhighlight %}
548548

549549
You can also add custom filters y accessing `JsonType::addCustomFilter` method.
550-
See JsonType reference.
550+
See [JsonType reference](http://codeception.com/docs/reference/JsonType).
551551

552+
@part json
552553
@version 2.1.3
553554
* `param array` $jsonType
554-
* Part: ** json**
555555

556556

557557
#### seeXmlResponseEquals

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