I am trying to run some acceptance tests in my Laravel application. While functional tests trigger testing environment, acceptance tests do not. Is it a bug or a feature of acceptance tests? The main problem why this is bothering me is the fact, that it is not using(+populating+cleanup) testing database, it only connects to dev database (which is used, when no other ENV is specified e.g. testing, production) and this often fails those tests when I run them multiple times.
This is my configuration:
codeception.yml
paths:
tests: app/tests
log: app/tests/_log
data: app/tests/_data
helpers: app/tests/_helpers
settings:
bootstrap: _bootstrap.php
suite_class: \PHPUnit_Framework_TestSuite
colors: true
memory_limit: 1024M
log: true
modules:
config:
Db:
dsn: 'mysql:host=localhost;dbname=testdb'
user: 'root'
password: 'root'
dump: 'app/tests/_data/dump.sql'
populate: true
cleanup: true
acceptance.suite.yml
class_name: WebGuy
modules:
enabled:
- PhpBrowser
- WebHelper
- Db
config:
PhpBrowser:
url: 'http://localhost/'
functional.suite.yml
class_name: TestGuy
modules:
enabled: [Filesystem, TestHelper, Laravel4, Db]
Thanks for your help!