Skip to content

Commit 7c541ba

Browse files
committed
auto updated documentation
1 parent 7e1faa0 commit 7c541ba

File tree

6 files changed

+38
-53
lines changed

6 files changed

+38
-53
lines changed

_includes/extensions.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,9 @@ extensions:
6767

6868
[See Source](https://github.com/Codeception/Codeception/blob/2.3/ext/Recorder.php)
6969

70-
Saves a screenshot of each step in acceptance tests and shows them as a slideshow on one HTML page.
70+
Saves a screenshot of each step in acceptance tests and shows them as a slideshow on one HTML page (here's an [example](http://codeception.com/images/recorder.gif))
7171
Activated only for suites with WebDriver module enabled.
7272

73-
![recorder](http://codeception.com/images/recorder.gif)
74-
7573
The screenshots are saved to `tests/_output/record_*` directories, open `index.html` to see them as a slideshow.
7674

7775
#### Installation

changelog.markdown

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ title: Codeception Changelog
77

88
# Changelog
99

10+
#### 2.3.2
11+
12+
* **[Db]** Fixed: Database has been cleaned up between tests even with `cleanup: false`.
13+
* **[Db]** Made `dump` optional if `populator` is set. Fixes [#4247](https://github.com/Codeception/Codeception/issues/4247)
14+
* Fixed `generate:suite` command to create a directory for the suite. Fixes [#4251](https://github.com/Codeception/Codeception/issues/4251)
15+
* Fixed composer autoloading with PHPUnit 6 by **[enumag](https://github.com/enumag)**. See [#4262](https://github.com/Codeception/Codeception/issues/4262)
16+
1017
#### 2.3.1
1118

1219
* Updated composer constraints to include PHPUnit 6.x

docs/02-GettingStarted.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ php codecept generate:scenarios
126126

127127
{% endhighlight %}
128128

129-
Generated scenarios will be stored in your `_output` directory in text files.
129+
These generated scenarios will be stored in your `_data` directory in text files.
130130

131131
Before we execute this test, we should make sure that the website is running on a local web server.
132132
Let's open the `tests/acceptance.suite.yml` file and replace the URL with the URL of your web application:

docs/modules/Db.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ title: Db - Codeception - Documentation
1313
Access a database.
1414

1515
The most important function of this module is to clean a database before each test.
16-
That's why this module was added to the global configuration file `codeception.yml`.
17-
To have your database properly cleaned you should configure it to access the database.
18-
This module also provides actions to perform checks in a database.
16+
This module also provides actions to perform checks in a database, e.g. [seeInDatabase()](http://codeception.com/docs/modules/Db#seeInDatabase)
1917

2018
In order to have your database populated with data you need a raw SQL dump.
2119
Simply put the dump in the `tests/_data` directory (by default) and specify the path in the config.

docs/modules/Doctrine2.md

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,37 @@ title: Doctrine2 - Codeception - Documentation
1010
# Doctrine2
1111

1212

13-
Allows integration and testing for projects with Doctrine2 ORM.
14-
Doctrine2 uses EntityManager to perform all database operations.
13+
Access the database using [Doctrine2 ORM](http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/).
1514

16-
When using with Zend Framework 2 or Symfony2 Doctrine connection is automatically retrieved from Service Locator.
17-
In this case you should include either **Symfony** or **ZF2** module and specify it as dependent for Doctrine:
15+
When used with Zend Framework 2 or Symfony2, Doctrine's Entity Manager is automatically retrieved from Service Locator.
16+
Set up your `functional.suite.yml` like this:
1817

1918
{% highlight yaml %}
2019
modules:
2120
enabled:
22-
- Symfony
21+
- Symfony # 'ZF2' or 'Symfony'
2322
- Doctrine2:
2423
depends: Symfony
24+
cleanup: true # All doctrine queries will be wrapped in a transaction, which will be rolled back at the end of each test
2525

2626
{% endhighlight %}
2727

28-
If you don't use any of frameworks above, you should specify a callback function to receive entity manager:
28+
If you don't use Symfony or Zend Framework, you need to specify a callback function to retrieve the Entity Manager:
2929

3030
{% highlight yaml %}
3131
modules:
3232
enabled:
3333
- Doctrine2:
3434
connection_callback: ['MyDb', 'createEntityManager']
35+
cleanup: true # All doctrine queries will be wrapped in a transaction, which will be rolled back at the end of each test
3536

3637

3738
{% endhighlight %}
3839

39-
This will use static method of `MyDb::createEntityManager()` to establish EntityManager.
40+
This will use static method of `MyDb::createEntityManager()` to establish the Entity Manager.
4041

41-
By default module will wrap everything into transaction for each test and rollback it afterwards. By doing this
42-
tests won't write anything to database, and so will run much faster and will be isolate dfrom each other.
43-
This behavior can be changed by specifying `cleanup: false` in config.
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.
4444

4545
### Status
4646

@@ -50,17 +50,6 @@ This behavior can be changed by specifying `cleanup: false` in config.
5050

5151
### Config
5252

53-
* cleanup: true - all doctrine queries will be run in transaction, which will be rolled back at the end of test.
54-
* connection_callback: - callable that will return an instance of EntityManager. This is a must if you run Doctrine without Zend2 or Symfony2 frameworks
55-
56-
#### Example (`functional.suite.yml`)
57-
58-
modules:
59-
enabled: [Doctrine2]
60-
config:
61-
Doctrine2:
62-
cleanup: false
63-
6453
### Public Properties
6554

6655
* `em` - Entity Manager
@@ -70,7 +59,7 @@ This behavior can be changed by specifying `cleanup: false` in config.
7059

7160
#### dontSeeInRepository
7261

73-
Flushes changes to database and performs ->findOneBy() call for current repository.
62+
Flushes changes to database and performs `findOneBy()` call for current repository.
7463

7564
* `param` $entity
7665
* `param array` $params
@@ -92,7 +81,7 @@ Example:
9281
{% highlight php %}
9382

9483
<?php
95-
$users = $I->grabEntitiesFromRepository('User', array('name' => 'davert'));
84+
$users = $I->grabEntitiesFromRepository('AppBundle:User', array('name' => 'davert'));
9685
?>
9786

9887
{% endhighlight %}
@@ -207,16 +196,15 @@ $I->persistEntity($user, array('name' => 'Miles'));
207196

208197
#### seeInRepository
209198

210-
Flushes changes to database executes a query defined by array.
211-
It builds query based on array of parameters.
199+
Flushes changes to database, and executes a query with parameters defined in an array.
212200
You can use entity associations to build complex queries.
213201

214202
Example:
215203

216204
{% highlight php %}
217205

218206
<?php
219-
$I->seeInRepository('User', array('name' => 'davert'));
207+
$I->seeInRepository('AppBundle:User', array('name' => 'davert'));
220208
$I->seeInRepository('User', array('name' => 'davert', 'Company' => array('name' => 'Codegyre')));
221209
$I->seeInRepository('Client', array('User' => array('Company' => array('name' => 'Codegyre')));
222210
?>

docs/reference/Module.md

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Requires module container (to provide access between modules of suite) and confi
7373

7474
* `param TestInterface` $test
7575

76-
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L257)
76+
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L253)
7777

7878
#### _afterStep()
7979

@@ -83,15 +83,15 @@ Requires module container (to provide access between modules of suite) and confi
8383

8484
* `param Step` $step
8585

86-
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L239)
86+
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L235)
8787

8888
#### _afterSuite()
8989

9090
*public* _afterSuite()
9191

9292
**HOOK** executed after suite
9393

94-
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L221)
94+
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L217)
9595

9696
#### _before()
9797

@@ -101,7 +101,7 @@ Requires module container (to provide access between modules of suite) and confi
101101

102102
* `param TestInterface` $test
103103

104-
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L248)
104+
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L244)
105105

106106
#### _beforeStep()
107107

@@ -111,7 +111,7 @@ Requires module container (to provide access between modules of suite) and confi
111111

112112
* `param Step` $step
113113

114-
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L230)
114+
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L226)
115115

116116
#### _beforeSuite()
117117

@@ -121,13 +121,7 @@ Requires module container (to provide access between modules of suite) and confi
121121

122122
* `param array` $settings
123123

124-
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L214)
125-
126-
#### _cleanup()
127-
128-
*public* _cleanup()
129-
130-
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L205)
124+
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L210)
131125

132126
#### _failed()
133127

@@ -138,7 +132,7 @@ Requires module container (to provide access between modules of suite) and confi
138132
* `param TestInterface` $test
139133
* `param \Exception` $fail
140134

141-
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L267)
135+
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L263)
142136

143137
#### _getConfig()
144138

@@ -149,7 +143,7 @@ Get config values or specific config item.
149143
* `param null` $key
150144
* `return` array|mixed|null
151145

152-
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L342)
146+
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L338)
153147

154148
#### _getName()
155149

@@ -610,7 +604,7 @@ Print debug message to the screen.
610604

611605
* `param` $message
612606

613-
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L276)
607+
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L272)
614608

615609
#### debugSection()
616610

@@ -621,7 +615,7 @@ Print debug message with a title
621615
* `param` $title
622616
* `param` $message
623617

624-
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L287)
618+
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L283)
625619

626620
#### fail()
627621

@@ -650,7 +644,7 @@ $this->getModule('WebDriver')->_findElements('.items');
650644
* `return` Module
651645
* `throws` ModuleException
652646

653-
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L328)
647+
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L324)
654648

655649
#### getModules()
656650

@@ -659,7 +653,7 @@ $this->getModule('WebDriver')->_findElements('.items');
659653
Get all enabled modules
660654
* `return` array
661655

662-
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L311)
656+
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L307)
663657

664658
#### hasModule()
665659

@@ -670,7 +664,7 @@ Checks that module is enabled.
670664
* `param` $name
671665
* `return` bool
672666

673-
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L301)
667+
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L297)
674668

675669
#### onReconfigure()
676670

@@ -684,7 +678,7 @@ HOOK to be executed when config changes with `_reconfigure`.
684678

685679
*protected* scalarizeArray($array)
686680

687-
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L353)
681+
[See source](https://github.com/Codeception/Codeception/blob/2.3/src/Codeception/Module.php#L349)
688682

689683
#### validateConfig()
690684

0 commit comments

Comments
 (0)