本文介绍了sahi和symfony2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用symfony2测试behat,貂皮和sahi

i would like to test behat, mink and sahi with symfony2

所以,在我的config_test.yml中,

so, in my config_test.yml i have

   mink:
   base_url:  http://localhost/Symfony_Standard_2.0.15_2/symfony/web/app_test.php
   default_session: symfony
   sahi: ~

并在test.feature中

and in test.feature

    @mink:sahi
    Scenario: Open page with products list and check it
    Given I am on "/hello"
    Then the response should contain "hello"

我执行死刑的时候

PHP致命错误:在C:\ wamp \中调用未定义的函数Buzz \ Client \ curl_init()www \ Symfony_Standard_2.0.15_2 \ Symfony \ vendor \ buzz \ lib \ Buzz \ Client \ AbstractCurl.php在第26行

PHP Fatal error: Call to undefined function Buzz\Client\curl_init() in C:\wamp\www\Symfony_Standard_2.0.15_2\Symfony\vendor\buzz\lib\Buzz\Client\AbstractCurl.php on line 26

请帮助我

推荐答案

似乎您没有 cURL 在您的WAMP安装中启用.实际上,默认情况下,WAMP中未启用cURL.启用它的步骤如下:

It seems that you do not have cURL enabled in your WAMP installation.Actually cURL is not enabled by default in WAMP. The steps to enable it are as follows :

  1. 关闭WAMP(如果正在运行)
  2. 导航到WAMP \ bin \ php(您的php版本)\
  3. 编辑php.ini
  4. 搜索curl,取消注释extension = php_curl.dll
  5. 导航到WAMP \ bin \ Apache(您的apache版本)\ bin \
  6. 编辑php.ini
  7. 搜索curl,取消注释extension = php_curl.dll
  8. 同时保存
  9. 重新启动WAMP

这篇关于sahi和symfony2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-12 12:22