More accurate readme on fixtures

This commit is contained in:
Ingo Schommer 2013-06-05 15:44:30 +02:00
parent 41fc8ac982
commit f18ec15dac
1 changed files with 5 additions and 8 deletions

View File

@ -194,20 +194,17 @@ use the inline definition syntax. The following example shows some syntax variat
* Fixtures are created where you defined them. If you want the fixtures to be created
before every scenario, define them in [Background](http://docs.behat.org/guides/1.gherkin.html#backgrounds).
If you want them to be created only when a particular scenario runs, define them there.
* Fixtures are cleared between scenarios.
* The basic syntax works for all `DataObject` subclasses, but some specific
notations like "is not published" requires extensions like `Hierarchy` to be applied to the class
* Record identifiers, property names and property values need to be quoted
* Record types shouldn't be quoted, and can use more natural notation ("registration page" instead of "Registration Page")
* Fixtures are usually not cleared between scenarios. You can alter this behaviour
by tagging the feature or scenario with `@database-defaults` tag.
* Record types, identifiers, property names and property values need to be quoted
* Record types (class names) can use more natural notation ("registration page" instead of "Registration Page")
* Record types support the `$singular_name` notation which is also used to reference the types throughout the CMS.
Record property names support the `$field_labels` notation in the same fashion.
* Property values may also use a `=>` symbol to indicate relationships between records.
The notation is `=><classname>.<identifier>`. For `has_many` or `many_many` relationships,
multiple relationships can be separated by a comma.
The module runner empties the database before each scenario tagged with
`@database-defaults` and populates it with default records (usually a set of
default pages).
## Writing Behat Tests
### Directory Structure