Skip to content

Commit b0c206f

Browse files
committed
updated
1 parent fa7f632 commit b0c206f

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

_posts/2016-03-05-codeception-2.2.-upcoming-features.markdown

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,25 @@ If you were mixing WebDriver with PhpBrowser in order to use REST API inside acc
9292
```yaml
9393
modules:
9494
enabled:
95-
- WebDriver
95+
- WebDriver:
9696
url: http://localhost/
9797
browser: firefox
98-
- REST
98+
- REST:
9999
url: http://localhost/api
100100
depends: PhpBrowser
101101
```
102102

103+
This way you can use API to create test data for application:
104+
105+
```php
106+
// let's create a post
107+
$I->sendPOST('/posts', ['title' => 'Hello, Codeception 2.2', 'body' => 'Almost here']);
108+
109+
// check it is actually there
110+
$I->amOnPage('/posts');
111+
$I->see('Hello, Codeception', 'h2');
112+
```
113+
103114
### ...and much more to come
104115

105116
Sure, that was not everything what is coming in 2.2! Stay tuned for new cool announcements, which will be posted soon. We will describe new modules, new test formats, and new features! Stay tuned.

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