Skip to content

Commit 2068cdc

Browse files
committed
Update module docs and changelog
1 parent 4066190 commit 2068cdc

File tree

14 files changed

+374
-247
lines changed

14 files changed

+374
-247
lines changed

changelog.markdown

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ title: Codeception Changelog
88
# Changelog
99

1010

11+
#### 4.1.9
12+
13+
* Support PHP 8 [#5999](https://github.com/Codeception/Codeception/issues/5999)
14+
* Generate correct default values in Actions files [#5999](https://github.com/Codeception/Codeception/issues/5999)
15+
* Use sendGet in Api template [#5998](https://github.com/Codeception/Codeception/issues/5998) by **[ThomasLandauer](https://github.com/ThomasLandauer)**
16+
1117
#### 4.1.8
1218

1319
* Support Covertura code coverage format [#5994](https://github.com/Codeception/Codeception/issues/5994) by **[zachkknowbe4](https://github.com/zachkknowbe4)**

docs/modules/Asserts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,7 @@ $I->expectException(new MyException("Don't do bad things"), function() {
11931193
{% endhighlight %}
11941194

11951195
@deprecated Use expectThrowable() instead
1196-
* `param Exception|string` $exception
1196+
* `param \Exception|string` $exception
11971197
* `param callable` $callback
11981198

11991199

@@ -1225,7 +1225,7 @@ $I->expectThrowable(new MyError("Don't do bad things"), function() {
12251225

12261226
{% endhighlight %}
12271227

1228-
* `param Throwable|string` $throwable
1228+
* `param \Throwable|string` $throwable
12291229
* `param callable` $callback
12301230

12311231

docs/modules/Db.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,15 @@ if you run into problems loading dumps and cleaning databases.
123123
user: 'userdb2'
124124
password: ''
125125

126+
### Example with Sqlite
127+
128+
modules:
129+
enabled:
130+
- Db:
131+
dsn: 'sqlite:relative/path/to/sqlite-database.db'
132+
user: ''
133+
password: ''
134+
126135
### SQL data dump
127136

128137
There are two ways of loading the dump into your database:
@@ -170,7 +179,7 @@ modules:
170179

171180
PDO dsn elements for the supported drivers:
172181
* MySQL: [PDO_MYSQL DSN](https://secure.php.net/manual/en/ref.pdo-mysql.connection.php)
173-
* SQLite: [PDO_SQLITE DSN](https://secure.php.net/manual/en/ref.pdo-sqlite.connection.php)
182+
* SQLite: [PDO_SQLITE DSN](https://secure.php.net/manual/en/ref.pdo-sqlite.connection.php) - use _relative_ path from the project root
174183
* PostgreSQL: [PDO_PGSQL DSN](https://secure.php.net/manual/en/ref.pdo-pgsql.connection.php)
175184
* MSSQL: [PDO_SQLSRV DSN](https://secure.php.net/manual/en/ref.pdo-sqlsrv.connection.php)
176185
* Oracle: [PDO_OCI DSN](https://secure.php.net/manual/en/ref.pdo-oci.connection.php)

docs/modules/Laravel5.md

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1934,53 +1934,51 @@ $I->selectOption('Which OS do you use?', array('value' => 'windows')); // Only s
19341934

19351935
#### sendAjaxGetRequest
19361936

1937-
If your page triggers an ajax request, you can perform it manually.
1938-
This action sends a GET ajax request with specified params.
1939-
1940-
See ->sendAjaxPostRequest for examples.
1937+
Sends an ajax GET request with the passed parameters.
1938+
See `sendAjaxPostRequest()`
19411939

19421940
* `param` $uri
19431941
* `param` $params
19441942

19451943

19461944
#### sendAjaxPostRequest
19471945

1948-
If your page triggers an ajax request, you can perform it manually.
1949-
This action sends a POST ajax request with specified params.
1950-
Additional params can be passed as array.
1951-
1946+
Sends an ajax POST request with the passed parameters.
1947+
The appropriate HTTP header is added automatically:
1948+
`X-Requested-With: XMLHttpRequest`
19521949
Example:
1950+
{% highlight php %}
19531951

1954-
Imagine that by clicking checkbox you trigger ajax request which updates user settings.
1955-
We emulate that click by running this ajax request manually.
1952+
<?php
1953+
$I->sendAjaxPostRequest('/add-task', ['task' => 'lorem ipsum']);
19561954

1955+
{% endhighlight %}
1956+
Some frameworks (e.g. Symfony) create field names in the form of an "array":
1957+
`<input type="text" name="form[task]">`
1958+
In this case you need to pass the fields like this:
19571959
{% highlight php %}
19581960

19591961
<?php
1960-
$I->sendAjaxPostRequest('/updateSettings', array('notifications' => true)); // POST
1961-
$I->sendAjaxGetRequest('/updateSettings', array('notifications' => true)); // GET
1962-
1962+
$I->sendAjaxPostRequest('/add-task', ['form' => [
1963+
'task' => 'lorem ipsum',
1964+
'category' => 'miscellaneous',
1965+
]]);
19631966

1964-
{% endhighlight %}
1967+
{% endhighlight %}
19651968

1966-
* `param` $uri
1967-
* `param` $params
1969+
* `param string` $uri
1970+
* `param array` $params
19681971

19691972

19701973
#### sendAjaxRequest
19711974

1972-
If your page triggers an ajax request, you can perform it manually.
1973-
This action sends an ajax request with specified method and params.
1974-
1975+
Sends an ajax request, using the passed HTTP method.
1976+
See `sendAjaxPostRequest()`
19751977
Example:
1976-
1977-
You need to perform an ajax request specifying the HTTP method.
1978-
19791978
{% highlight php %}
19801979

19811980
<?php
1982-
$I->sendAjaxRequest('PUT', '/posts/7', array('title' => 'new title'));
1983-
1981+
$I->sendAjaxRequest('PUT', '/posts/7', ['title' => 'new title']);
19841982

19851983
{% endhighlight %}
19861984

docs/modules/Lumen.md

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,53 +1543,51 @@ $I->selectOption('Which OS do you use?', array('value' => 'windows')); // Only s
15431543

15441544
#### sendAjaxGetRequest
15451545

1546-
If your page triggers an ajax request, you can perform it manually.
1547-
This action sends a GET ajax request with specified params.
1548-
1549-
See ->sendAjaxPostRequest for examples.
1546+
Sends an ajax GET request with the passed parameters.
1547+
See `sendAjaxPostRequest()`
15501548

15511549
* `param` $uri
15521550
* `param` $params
15531551

15541552

15551553
#### sendAjaxPostRequest
15561554

1557-
If your page triggers an ajax request, you can perform it manually.
1558-
This action sends a POST ajax request with specified params.
1559-
Additional params can be passed as array.
1560-
1555+
Sends an ajax POST request with the passed parameters.
1556+
The appropriate HTTP header is added automatically:
1557+
`X-Requested-With: XMLHttpRequest`
15611558
Example:
1559+
{% highlight php %}
15621560

1563-
Imagine that by clicking checkbox you trigger ajax request which updates user settings.
1564-
We emulate that click by running this ajax request manually.
1561+
<?php
1562+
$I->sendAjaxPostRequest('/add-task', ['task' => 'lorem ipsum']);
15651563

1564+
{% endhighlight %}
1565+
Some frameworks (e.g. Symfony) create field names in the form of an "array":
1566+
`<input type="text" name="form[task]">`
1567+
In this case you need to pass the fields like this:
15661568
{% highlight php %}
15671569

15681570
<?php
1569-
$I->sendAjaxPostRequest('/updateSettings', array('notifications' => true)); // POST
1570-
$I->sendAjaxGetRequest('/updateSettings', array('notifications' => true)); // GET
1571-
1571+
$I->sendAjaxPostRequest('/add-task', ['form' => [
1572+
'task' => 'lorem ipsum',
1573+
'category' => 'miscellaneous',
1574+
]]);
15721575

1573-
{% endhighlight %}
1576+
{% endhighlight %}
15741577

1575-
* `param` $uri
1576-
* `param` $params
1578+
* `param string` $uri
1579+
* `param array` $params
15771580

15781581

15791582
#### sendAjaxRequest
15801583

1581-
If your page triggers an ajax request, you can perform it manually.
1582-
This action sends an ajax request with specified method and params.
1583-
1584+
Sends an ajax request, using the passed HTTP method.
1585+
See `sendAjaxPostRequest()`
15841586
Example:
1585-
1586-
You need to perform an ajax request specifying the HTTP method.
1587-
15881587
{% highlight php %}
15891588

15901589
<?php
1591-
$I->sendAjaxRequest('PUT', '/posts/7', array('title' => 'new title'));
1592-
1590+
$I->sendAjaxRequest('PUT', '/posts/7', ['title' => 'new title']);
15931591

15941592
{% endhighlight %}
15951593

docs/modules/Mezzio.md

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,53 +1189,51 @@ $I->selectOption('Which OS do you use?', array('value' => 'windows')); // Only s
11891189

11901190
#### sendAjaxGetRequest
11911191

1192-
If your page triggers an ajax request, you can perform it manually.
1193-
This action sends a GET ajax request with specified params.
1194-
1195-
See ->sendAjaxPostRequest for examples.
1192+
Sends an ajax GET request with the passed parameters.
1193+
See `sendAjaxPostRequest()`
11961194

11971195
* `param` $uri
11981196
* `param` $params
11991197

12001198

12011199
#### sendAjaxPostRequest
12021200

1203-
If your page triggers an ajax request, you can perform it manually.
1204-
This action sends a POST ajax request with specified params.
1205-
Additional params can be passed as array.
1206-
1201+
Sends an ajax POST request with the passed parameters.
1202+
The appropriate HTTP header is added automatically:
1203+
`X-Requested-With: XMLHttpRequest`
12071204
Example:
1205+
{% highlight php %}
12081206

1209-
Imagine that by clicking checkbox you trigger ajax request which updates user settings.
1210-
We emulate that click by running this ajax request manually.
1207+
<?php
1208+
$I->sendAjaxPostRequest('/add-task', ['task' => 'lorem ipsum']);
12111209

1210+
{% endhighlight %}
1211+
Some frameworks (e.g. Symfony) create field names in the form of an "array":
1212+
`<input type="text" name="form[task]">`
1213+
In this case you need to pass the fields like this:
12121214
{% highlight php %}
12131215

12141216
<?php
1215-
$I->sendAjaxPostRequest('/updateSettings', array('notifications' => true)); // POST
1216-
$I->sendAjaxGetRequest('/updateSettings', array('notifications' => true)); // GET
1217-
1217+
$I->sendAjaxPostRequest('/add-task', ['form' => [
1218+
'task' => 'lorem ipsum',
1219+
'category' => 'miscellaneous',
1220+
]]);
12181221

1219-
{% endhighlight %}
1222+
{% endhighlight %}
12201223

1221-
* `param` $uri
1222-
* `param` $params
1224+
* `param string` $uri
1225+
* `param array` $params
12231226

12241227

12251228
#### sendAjaxRequest
12261229

1227-
If your page triggers an ajax request, you can perform it manually.
1228-
This action sends an ajax request with specified method and params.
1229-
1230+
Sends an ajax request, using the passed HTTP method.
1231+
See `sendAjaxPostRequest()`
12301232
Example:
1231-
1232-
You need to perform an ajax request specifying the HTTP method.
1233-
12341233
{% highlight php %}
12351234

12361235
<?php
1237-
$I->sendAjaxRequest('PUT', '/posts/7', array('title' => 'new title'));
1238-
1236+
$I->sendAjaxRequest('PUT', '/posts/7', ['title' => 'new title']);
12391237

12401238
{% endhighlight %}
12411239

docs/modules/Phalcon.md

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,53 +1437,51 @@ $I->selectOption('Which OS do you use?', array('value' => 'windows')); // Only s
14371437

14381438
#### sendAjaxGetRequest
14391439

1440-
If your page triggers an ajax request, you can perform it manually.
1441-
This action sends a GET ajax request with specified params.
1442-
1443-
See ->sendAjaxPostRequest for examples.
1440+
Sends an ajax GET request with the passed parameters.
1441+
See `sendAjaxPostRequest()`
14441442

14451443
* `param` $uri
14461444
* `param` $params
14471445

14481446

14491447
#### sendAjaxPostRequest
14501448

1451-
If your page triggers an ajax request, you can perform it manually.
1452-
This action sends a POST ajax request with specified params.
1453-
Additional params can be passed as array.
1454-
1449+
Sends an ajax POST request with the passed parameters.
1450+
The appropriate HTTP header is added automatically:
1451+
`X-Requested-With: XMLHttpRequest`
14551452
Example:
1453+
{% highlight php %}
14561454

1457-
Imagine that by clicking checkbox you trigger ajax request which updates user settings.
1458-
We emulate that click by running this ajax request manually.
1455+
<?php
1456+
$I->sendAjaxPostRequest('/add-task', ['task' => 'lorem ipsum']);
14591457

1458+
{% endhighlight %}
1459+
Some frameworks (e.g. Symfony) create field names in the form of an "array":
1460+
`<input type="text" name="form[task]">`
1461+
In this case you need to pass the fields like this:
14601462
{% highlight php %}
14611463

14621464
<?php
1463-
$I->sendAjaxPostRequest('/updateSettings', array('notifications' => true)); // POST
1464-
$I->sendAjaxGetRequest('/updateSettings', array('notifications' => true)); // GET
1465-
1465+
$I->sendAjaxPostRequest('/add-task', ['form' => [
1466+
'task' => 'lorem ipsum',
1467+
'category' => 'miscellaneous',
1468+
]]);
14661469

1467-
{% endhighlight %}
1470+
{% endhighlight %}
14681471

1469-
* `param` $uri
1470-
* `param` $params
1472+
* `param string` $uri
1473+
* `param array` $params
14711474

14721475

14731476
#### sendAjaxRequest
14741477

1475-
If your page triggers an ajax request, you can perform it manually.
1476-
This action sends an ajax request with specified method and params.
1477-
1478+
Sends an ajax request, using the passed HTTP method.
1479+
See `sendAjaxPostRequest()`
14781480
Example:
1479-
1480-
You need to perform an ajax request specifying the HTTP method.
1481-
14821481
{% highlight php %}
14831482

14841483
<?php
1485-
$I->sendAjaxRequest('PUT', '/posts/7', array('title' => 'new title'));
1486-
1484+
$I->sendAjaxRequest('PUT', '/posts/7', ['title' => 'new title']);
14871485

14881486
{% endhighlight %}
14891487

0 commit comments

Comments
 (0)