To moja struktura katalogów:Behat - Nie znaleziono klasy kontekstowej.
composer.json
composer.phar
vendor/
bin/
behat
tests/
functional/
behat.yml
features/
registration.feature
bootstrap/
FeatureContext.php
zrobiłem:
cd tests/functional
../../vendor/bin/behat --init
który stworzył podstawową strukturę dla mnie. Jest wewnątrz behat.yml:
default:
paths:
features: '%behat.paths.base%/features'
bootstrap: '%behat.paths.base%/features/bootstrap'
Teraz próbuję uruchomić testy BDD tak:
vendor/bin/behat -c tests/functional/behat.yml
i dostaję:
[RuntimeException]
Context class not found.
Maybe you have provided wrong or no `bootstrap` path in your behat.yml:
http://docs.behat.org/guides/7.config.html#paths
behat [--init] [-f|--format="..."] [--out="..."] [--lang="..."] [--[no-]ansi] [--[no-]time] [--[no-]paths] [--[no-]snippets] [--[no-]snippets-paths] [--[no-]multiline] [--[no-]expand] [--story-syntax] [-d|--definitions="..."] [--name="..."] [--tags="..."] [--cache="..."] [--strict] [--dry-run] [--rerun="..."] [--append-snippets] [--append-to="..."] [features]
Każdy pomysł na czym polega problem?
Zainstalowałem Behat przez Composer. To jest mój composer.json:
{
"name": "hello",
"description": "Hello World",
"minimum-stability": "dev",
"require": {
"php": ">=5.3",
"zendframework/zendframework": "2.1.4",
"doctrine/common": "dev-master#d7987c96675e153638729383577090feed9854f1"
},
"require-dev": {
"phpunit/phpunit": "3.7.14",
"behat/behat": "2.4.*@stable"
}
}
które zainstalowałem z:
php composer.phar install --dev -o
Wciąż otrzymuję ten sam błąd. Muszę zachować tę strukturę folderów, ponieważ jest to konwencja projektu. Nie może znajdować się w folderze głównym. –
Nie chcę również zmieniać folderu bin. Używam również innych bibliotek, a ich pliki binarne znajdują się w katalogu vendor/bin / –