Commit Graph

19 Commits

Author SHA1 Message Date
Damian Mooyman
7e50e57766 Fix include paths 2016-09-08 16:32:06 +12:00
Damian Mooyman
faca1e6f71
Update for framework namespacing 2016-09-08 10:07:35 +12:00
Damian Mooyman
1eb1004957
Convert to PSR-2 standard
Enforce PHPCS checking
2016-08-10 13:56:30 +12:00
Jeffrey Guo
299cde3c90 add condition to prevent running endTestSession() twice
reformatted with space indent
2015-12-21 10:54:10 +13:00
Sean Harvey
61e7bb44cf Revert "Allow setting create_temp_database to false to stop temp db creation" 2014-10-09 09:55:00 +13:00
Sean Harvey
9c3319a342 Allow setting create_temp_database to false to stop temp db creation
TestSessionEnvironment by default will create a temporary database for
use with behat tests, but this may not be required.

e.g. in your behat.yml:

```
default:
...

  extensions:
    ...
    SilverStripe\BehatExtension\Extension:
      create_temp_database: false
```
2014-10-08 19:59:06 +13:00
Sriram Venkatesh
2acd0889d4 Find Link in Region 2014-03-19 17:09:43 +13:00
Will Rossiter
21b05999ee Prevent undefined method on error 2014-03-03 22:11:04 +13:00
Ingo Schommer
ca455423ef Changes required for persisting state directly on disk
applyState() used to persist in memory, which could lead
to outdated state depending on execution flow between CLI
and web requests. Since state is now in a JSON object,
it also fixes the array access.
2014-03-01 18:26:21 +13:00
Ingo Schommer
0be032261a Calling destructor on fatal errors
Avoids leaving TESTS_RUNNING.js around
2014-02-09 18:56:40 +13:00
Ingo Schommer
0308dee0dc Merge pull request #23 from madmatt/pulls/TestSessionEnvironment
Update SilverStripeAwareInitializer to use new TestSessionEnvironment class
2014-02-09 18:47:13 +13:00
madmatt
d61760ddc6 Update SilverStripeAwareInitializer to use new TestSessionEnvironment class.
This change is designed to be merged in at the same time as the matching
testsession PR (silverstripe-labs/silverstripe-testsession#7) is merged in, as
it relies on changes introduced in that PR to function.

This updates the behat-extension to use the new file-based capabilities of the
testsession module. Instead of creating a temp database, it will create an
entire testsession in the initializer, and then continue on as per normal. When
Behat runs end, the cleanup code will completely remove the testsession state,
instead of just removing the temp database. This may mean in the future that
you can hook into the TestSessionEnvironment via extensions, and connect to
other test services during a testsession, then cleanup after yourself on ending
a test session.

API CHANGES:
- Remove SilverStripeAwareInitializer::initializeTempDb()
- Remove SilverStripeAwareInitializer::deleteTempDb()
2014-02-05 11:57:46 +13:00
Ingo Schommer
6f9352cac4 Use stdout instead of stderror for notices 2013-08-13 13:03:29 +02:00
Ingo Schommer
e98233db65 NEW Auto-detect base_url from FILE_TO_URL_MAPPING
Removed framework_host since its no longer necessary due to the changed execution logic.
Unfortunately had to subclass the existing Mink Extension class since we can't influence
its config persistence from our own extensions (with a completely separate ContainerBuilder).

Also restructured README to be more focused on execution rather
than diving into deep config concerns early on.
2013-05-09 16:26:24 +02:00
Ingo Schommer
b170e621c9 More feedback on which temp db gets created 2012-12-19 15:56:33 +01:00
Ingo Schommer
74e0d8cd83 Fixed coding conventions (no functional changes)
Both Symfony and SilverStripe conventions mandate
lower camel case for instance properties
2012-11-18 11:51:00 +01:00
Ingo Schommer
38a27d2a50 NEW Reduced boilerplate configuration
- Moved all extension-specific conf into its own configuration namespace
- Described configuration via PHP, and added default values
- Removed boilerplate config from README
- Made screenshot_path optional
- Configurable ajax_timeout settings

Note: The DI system plus the initializer+context combo requires insane amounts of code duplication,
will need to be looked at more closely (very little docs on that level of Behat extension available).
2012-11-14 00:29:40 +01:00
Ingo Schommer
ee4d8b7381 BUGFIX Flush manifests when bootstrapping tests 2012-11-09 15:46:33 +01:00
Ingo Schommer
afcae36eec Resolved vendor confusion, its "SilverStripe", not "Behat"
"Behat" as a vendor namespace is already taken by the project
of the same name.
2012-10-16 22:05:17 +02:00