php - Why can magento behat test not find my database? -
when call bin/behat
execute tests, error:
test.dev bin/behat [zend_db_adapter_exception] sqlstate[hy000] [2002] no such file or directory [pdoexception] sqlstate[hy000] [2002] no such file or directory
this composer.json
:
{ "require": { "php": ">=5.4.0" }, "require-dev": { "magetest/magento-behat-extension": "dev-develop", "magetest/magento-phpspec-extension": "~2.0", "peridot-php/webdriver-manager": "dev-master", "bossa/phpspec2-expect": "dev-master", "behat/mink-extension": "*", "behat/mink-goutte-driver": "*", "behat/mink-selenium2-driver": "*", "behat/mink-selenium-driver": "*" }, "autoload": { "psr-0": { "": [ "html/app", "html/app/code/community", "html/app/code/core", "html/lib" ], "mage" : "html/app/code/core" } }, "config": { "bin-dir": "bin" } }
and behat.yml
:
default: paths: features: features bootstrap: features/bootstrap extensions: magetest\magentoextension\extension: ~ behat\minkextension\extension: base_url: http://test.dev goutte: ~ selenium2: ~ default_session: selenium2
it's patchwork of several tutorials while every of them threw same error. magento installation in html under project. thing differs tutorials is, have no html/app/code/local
folder. composer install , behat --init run without errors.
edit: i'm working mamp pro, found this issue. linking socket file /tmp did not fix problem.
since use mamp, have configure cli well:
export path=/applications/mamp/bin/php/php5.6.10/bin:$path
now cli uses mamp php version , runs well.
Comments
Post a Comment