Skip to content

Commit e8d361e

Browse files
authored
Merge pull request Codeception#190 from Codeception/routine-documentation-update
Routine documentation update
2 parents b3b7db5 + 3e3a209 commit e8d361e

5 files changed

Lines changed: 163 additions & 124 deletions

File tree

RoboFile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ function (\ReflectionMethod $m, $doc) {
280280
public function buildDocsApi()
281281
{
282282
$this->say("API Classes");
283-
$apiClasses = ['Codeception\Module', 'Codeception\InitTemplate'];
283+
$apiClasses = ['\Codeception\Module', '\Codeception\InitTemplate'];
284284

285285
foreach ($apiClasses as $apiClass) {
286286
$name = (new ReflectionClass($apiClass))->getShortName();

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

docs/reference/InitTemplate.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ This class provides various helper methods for building customized setup
3434
3535
*public* __construct($input, $output)
3636
37-
[See source](https://github.com/Codeception/Codeception/blob/4.0/srcCodeception/InitTemplate.php#L65)
37+
[See source](https://github.com/Codeception/Codeception/blob/4.0/src/Codeception/InitTemplate.php#L65)
3838
3939
#### addStyles()
4040
4141
*public* addStyles($output)
4242
43-
[See source](https://github.com/Codeception/Codeception/blob/4.0/srcCodeception/InitTemplate.php#L9)
43+
[See source](https://github.com/Codeception/Codeception/blob/4.0/src/Codeception/InitTemplate.php#L9)
4444
4545
#### ask()
4646
@@ -64,25 +64,25 @@ $this->ask('do you want to proceed (y/n)', true);
6464
* `param null` $answer
6565
* `return` mixed|string
6666

67-
[See source](https://github.com/Codeception/Codeception/blob/4.0/srcCodeception/InitTemplate.php#L107)
67+
[See source](https://github.com/Codeception/Codeception/blob/4.0/src/Codeception/InitTemplate.php#L107)
6868

6969
#### breakParts()
7070

7171
*protected* breakParts($class)
7272

73-
[See source](https://github.com/Codeception/Codeception/blob/4.0/srcCodeception/InitTemplate.php#L6)
73+
[See source](https://github.com/Codeception/Codeception/blob/4.0/src/Codeception/InitTemplate.php#L6)
7474

7575
#### checkInstalled()
7676

7777
*protected* checkInstalled($dir = null)
7878

79-
[See source](https://github.com/Codeception/Codeception/blob/4.0/srcCodeception/InitTemplate.php#L208)
79+
[See source](https://github.com/Codeception/Codeception/blob/4.0/src/Codeception/InitTemplate.php#L208)
8080

8181
#### completeSuffix()
8282

8383
*protected* completeSuffix($filename, $suffix)
8484

85-
[See source](https://github.com/Codeception/Codeception/blob/4.0/srcCodeception/InitTemplate.php#L25)
85+
[See source](https://github.com/Codeception/Codeception/blob/4.0/src/Codeception/InitTemplate.php#L25)
8686

8787
#### createActor()
8888

@@ -95,13 +95,13 @@ Requires a suite config as array in 3rd parameter.
9595
* `param` $directory
9696
* `param` $suiteConfig
9797

98-
[See source](https://github.com/Codeception/Codeception/blob/4.0/srcCodeception/InitTemplate.php#L223)
98+
[See source](https://github.com/Codeception/Codeception/blob/4.0/src/Codeception/InitTemplate.php#L223)
9999

100100
#### createDirectoryFor()
101101

102102
*protected* createDirectoryFor($basePath, $className = null)
103103

104-
[See source](https://github.com/Codeception/Codeception/blob/4.0/srcCodeception/InitTemplate.php#L10)
104+
[See source](https://github.com/Codeception/Codeception/blob/4.0/src/Codeception/InitTemplate.php#L10)
105105

106106
#### createEmptyDirectory()
107107

@@ -110,13 +110,13 @@ Requires a suite config as array in 3rd parameter.
110110
Create an empty directory and add a placeholder file into it
111111
* `param` $dir
112112

113-
[See source](https://github.com/Codeception/Codeception/blob/4.0/srcCodeception/InitTemplate.php#L195)
113+
[See source](https://github.com/Codeception/Codeception/blob/4.0/src/Codeception/InitTemplate.php#L195)
114114

115115
#### createFile()
116116

117117
*protected* createFile($filename, $contents, $force = null, $flags = null)
118118

119-
[See source](https://github.com/Codeception/Codeception/blob/4.0/srcCodeception/InitTemplate.php#L46)
119+
[See source](https://github.com/Codeception/Codeception/blob/4.0/src/Codeception/InitTemplate.php#L46)
120120

121121
#### createHelper()
122122

@@ -127,51 +127,51 @@ Create a helper class inside a directory
127127
* `param` $name
128128
* `param` $directory
129129

130-
[See source](https://github.com/Codeception/Codeception/blob/4.0/srcCodeception/InitTemplate.php#L174)
130+
[See source](https://github.com/Codeception/Codeception/blob/4.0/src/Codeception/InitTemplate.php#L174)
131131

132132
#### getNamespaceHeader()
133133

134134
*protected* getNamespaceHeader($class)
135135

136-
[See source](https://github.com/Codeception/Codeception/blob/4.0/srcCodeception/InitTemplate.php#L31)
136+
[See source](https://github.com/Codeception/Codeception/blob/4.0/src/Codeception/InitTemplate.php#L31)
137137

138138
#### getNamespaceString()
139139

140140
*protected* getNamespaceString($class)
141141

142-
[See source](https://github.com/Codeception/Codeception/blob/4.0/srcCodeception/InitTemplate.php#L25)
142+
[See source](https://github.com/Codeception/Codeception/blob/4.0/src/Codeception/InitTemplate.php#L25)
143143

144144
#### getNamespaces()
145145

146146
*protected* getNamespaces($class)
147147

148-
[See source](https://github.com/Codeception/Codeception/blob/4.0/srcCodeception/InitTemplate.php#L40)
148+
[See source](https://github.com/Codeception/Codeception/blob/4.0/src/Codeception/InitTemplate.php#L40)
149149

150150
#### getShortClassName()
151151

152152
*protected* getShortClassName($class)
153153

154-
[See source](https://github.com/Codeception/Codeception/blob/4.0/srcCodeception/InitTemplate.php#L19)
154+
[See source](https://github.com/Codeception/Codeception/blob/4.0/src/Codeception/InitTemplate.php#L19)
155155

156156
#### gitIgnore()
157157

158158
*protected* gitIgnore($path)
159159

160-
[See source](https://github.com/Codeception/Codeception/blob/4.0/srcCodeception/InitTemplate.php#L201)
160+
[See source](https://github.com/Codeception/Codeception/blob/4.0/src/Codeception/InitTemplate.php#L201)
161161

162162
#### initDir()
163163

164164
*public* initDir($workDir)
165165

166166
Change the directory where Codeception should be installed.
167167

168-
[See source](https://github.com/Codeception/Codeception/blob/4.0/srcCodeception/InitTemplate.php#L75)
168+
[See source](https://github.com/Codeception/Codeception/blob/4.0/src/Codeception/InitTemplate.php#L75)
169169

170170
#### removeSuffix()
171171

172172
*protected* removeSuffix($classname, $suffix)
173173

174-
[See source](https://github.com/Codeception/Codeception/blob/4.0/srcCodeception/InitTemplate.php#L40)
174+
[See source](https://github.com/Codeception/Codeception/blob/4.0/src/Codeception/InitTemplate.php#L40)
175175

176176
#### say()
177177

@@ -189,7 +189,7 @@ $this->say('Welcome to Setup');
189189

190190
* `param string` $message
191191

192-
[See source](https://github.com/Codeception/Codeception/blob/4.0/srcCodeception/InitTemplate.php#L136)
192+
[See source](https://github.com/Codeception/Codeception/blob/4.0/src/Codeception/InitTemplate.php#L136)
193193

194194
#### sayInfo()
195195

@@ -198,7 +198,7 @@ $this->say('Welcome to Setup');
198198
Print info message
199199
* `param` $message
200200

201-
[See source](https://github.com/Codeception/Codeception/blob/4.0/srcCodeception/InitTemplate.php#L163)
201+
[See source](https://github.com/Codeception/Codeception/blob/4.0/src/Codeception/InitTemplate.php#L163)
202202

203203
#### saySuccess()
204204

@@ -207,7 +207,7 @@ Print info message
207207
Print a successful message
208208
* `param` $message
209209

210-
[See source](https://github.com/Codeception/Codeception/blob/4.0/srcCodeception/InitTemplate.php#L145)
210+
[See source](https://github.com/Codeception/Codeception/blob/4.0/src/Codeception/InitTemplate.php#L145)
211211

212212
#### sayWarning()
213213

@@ -216,7 +216,7 @@ Print a successful message
216216
Print warning message
217217
* `param` $message
218218

219-
[See source](https://github.com/Codeception/Codeception/blob/4.0/srcCodeception/InitTemplate.php#L154)
219+
[See source](https://github.com/Codeception/Codeception/blob/4.0/src/Codeception/InitTemplate.php#L154)
220220

221221
#### setup()
222222

@@ -225,6 +225,6 @@ Print warning message
225225
Override this class to create customized setup.
226226
* `return` mixed
227227

228-
[See source](https://github.com/Codeception/Codeception/blob/4.0/srcCodeception/InitTemplate.php#L88)
228+
[See source](https://github.com/Codeception/Codeception/blob/4.0/src/Codeception/InitTemplate.php#L88)
229229

230-
<p>&nbsp;</p><div class="alert alert-warning">Reference is taken from the source code. <a href="https://github.com/Codeception/Codeception/blob/4.0/srcCodeception/InitTemplate.php">Help us to improve documentation. Edit module reference</a></div>
230+
<p>&nbsp;</p><div class="alert alert-warning">Reference is taken from the source code. <a href="https://github.com/Codeception/Codeception/blob/4.0/src/Codeception/InitTemplate.php">Help us to improve documentation. Edit module reference</a></div>

0 commit comments

Comments
 (0)