MageTest / BehatMage

Behat for Magento
MIT License
85 stars 31 forks source link

Call to a member function customerLogin() on a non-object #38

Open FlorianSLT opened 10 years ago

FlorianSLT commented 10 years ago

Hi, I just installed Behat for Magento and started to create my first Behat Test but when I use the MagentoContext, I encounter this error:

PHP Fatal error: Call to a member function customerLogin() on a non-object in /var/www/sf/main/magento/vendor/magetest/magento-behat-extension/src/MageTest/MagentoExtension/Context/MagentoContext.php on line 104

Here's my behat.yml:

default:
  paths:
    features:  features
    bootstrap: features/bootstrap

annotations:
  paths:
    features: features/annotations

closures:
  paths:
    features: features/closures

extensions:
  MageTest\MagentoExtension\Extension:
    base_url: "http://avanti.magento.main.sf.devs.ppm.galilee.fr"

It looks like my behat.yml is never read

And here is my directory layout:

project-dir ├── behat.yml ├── bin │ └── behat ├── composer.json ├── composer.lock ├── features │ ├── bootstrap │ └── ... ├── app ├── downloader ├── index.php ├── js ├── skin ├── var └── ... └── vendor ├── autoload.php ├── behat ├── magetest └── ...

jamescowie commented 9 years ago

Have you updated your composer.yml file with the autoload section ? Can you provide the scenario and step definition you are using that is causing this error ?