Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Behat "Unrecognized options"

Tags:

php

laravel

behat

I'm trying to run Behat (first time for me) and it worked.

But i have a configuration problem. I tried to change the paths of features and bootstrap like so:

#behat.yml
default:
    paths:
        features: app/tests/features
        bootstrap: %behat.paths.features%/bootstrap

Now i'm getting an exception:

[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException] Unrecognized options "paths" under "testwork"

What did i do wrong?

like image 384
Patrick Avatar asked Jan 08 '14 09:01

Patrick


2 Answers

Behat 3 is out by now. You configure paths as follows:

#behat.yml
default:
  autoload:
    '': %paths.base%/tests/features/bootstrap
  suites:
    default:
      paths:
        - %paths.base%/tests/features

The path given in the autoload section sets the path where Behat looks for context classes. The paths in the suites section are where the feature definitions (of the default suite in this case) live in.

like image 197
christopheraue Avatar answered Nov 16 '22 00:11

christopheraue


You're trying to use Behat 3, which is not released yet - use version 2.5 instead.

like image 4
everzet Avatar answered Nov 15 '22 23:11

everzet