When I want run my behat test like in this tutorial, I get an error message:
➜ test.dev bin/behat --suite=system
PHP Fatal error: Cannot redeclare class SystemContext in /Applications/MAMP/htdocs/test.dev/features/bootstrap/SystemContex.php on line 12
And I do not know why, because I wrote my behat.yml
like at this page:
default:
suites:
site:
paths: [ %paths.base%/features/site ]
contexts: [ SiteContext ]
system:
paths: [ %paths.base%/features/system ]
contexts: [ SystemContex ]
extensions:
MageTest\MagentoExtension\Extension: ~
Behat\MinkExtension:
base_url: 'http://test.dev/'
selenium2:
wd_host: http://127.0.0.1:4444/wd/hub
browser: firefox
My file structure is like:
project-dir
├── behat.yml
├── bin
│ └── behat
├── composer.json
├── composer.lock
├── features
│ ├── bootstrap
│ │ ├── FeatureContext.php
│ │ ├── SiteContext.php
│ │ └── SystemContext.php
│ ├── site
│ │ └── ...
│ └── system
│ └── check_baseurl.feature
├── htdocs
│ ├── app
│ ├── downloader
│ ├── index.php
│ ├── js
│ ├── skin
│ ├── var
│ └── ...
└── vendor
├── autoload.php
├── behat
├── magetest
└── ...