Skip to content

Commit 650206c

Browse files
committed
Updated documentation of Asserts and Doctrine2 modules
1 parent 5810e1d commit 650206c

2 files changed

Lines changed: 30 additions & 5 deletions

File tree

docs/modules/Asserts.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,16 @@ __not documented__
370370
__not documented__
371371

372372

373+
#### assertStringEndsNotWith
374+
375+
* `Available since` 1.1.0 of module-asserts
376+
377+
378+
#### assertStringEndsWith
379+
380+
* `Available since` 1.1.0 of module-asserts
381+
382+
373383
#### assertStringNotContainsString
374384
__not documented__
375385

docs/modules/Doctrine2.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,24 @@ modules:
3939

4040
This will use static method of `MyDb::createEntityManager()` to establish the Entity Manager.
4141

42-
By default, the module will wrap everything into a transaction for each test and roll it back afterwards. By doing this
43-
tests will run much faster and will be isolated from each other.
42+
By default, the module will wrap everything into a transaction for each test and roll it back afterwards
43+
(this is controlled by the `cleanup` setting).
44+
By doing this, tests will run much faster and will be isolated from each other.
45+
46+
To use the Doctrine2 Module in acceptance tests, set up your `acceptance.suite.yml` like this:
47+
48+
{% highlight yaml %}
49+
50+
modules:
51+
enabled:
52+
- Symfony:
53+
part: SERVICES
54+
- Doctrine2:
55+
depends: Symfony
56+
``
57+
58+
You cannot use `cleanup: true` in an acceptance test, since Codeception and your app (i.e. browser) are using two
59+
different connections to the database, so Codeception can't wrap changes made by the app into a transaction.
4460

4561
### Status
4662

@@ -60,16 +76,15 @@ Every method that expects some parameters to be checked against values in the da
6076
`dontSee...()`, `grab...()`) can accept instance of \Doctrine\Common\Collections\Criteria for more
6177
flexibility, e.g.:
6278

63-
{% highlight php %}
6479

80+
{% endhighlight %} php
6581
$I->seeInRepository('User', [
6682
'name' => 'John',
6783
Criteria::create()->where(
6884
Criteria::expr()->endsWith('email', '@domain.com')
6985
),
7086
]);
71-
72-
{% endhighlight %}
87+
```
7388
7489
If criteria is just a `->where(...)` construct, you can pass just expression without criteria wrapper:
7590

0 commit comments

Comments
 (0)