2013-04-16 2 views
0

나는 산 사자 macbook에 behat와 mink를 설치하기 위해 다음과 같은 turotiral을 사용하고 있습니다. Mac OS X에서 배를 통해 Behat 설치

http://www.ifusio.com/blog/how-to-install-behat-mink-on-mac-osx

그것은 모두 당신이 내가 그것을 모두가 잘 보인다 Github의 방법을 통해 설치하면, 나는 다음과 같은 오류

PHP Fatal error: Class 'Symfony\Component\Console\Helper\ProgressHelper' not found in /Users/waseem/pear/share/pear/Symfony/Component/Console/Application.php on line 966 
PHP Stack trace: 
PHP 1. {main}() /Users/waseem/pear/bin/behat:0 
PHP 2. Behat\Behat\Console\BehatApplication->__construct() /Users/waseem/pear/bin/behat:26 
PHP 3. Symfony\Component\Console\Application->__construct() /Users/waseem/pear/share/pear/behat/src/Behat/Behat/Console/BehatApplication.php:32 
PHP 4. Symfony\Component\Console\Application->getDefaultHelperSet() /Users/waseem/pear/share/pear/Symfony/Component/Console/Application.php:75 

Fatal error: Class 'Symfony\Component\Console\Helper\ProgressHelper' not found in /Users/waseem/pear/share/pear/Symfony/Component/Console/Application.php on line 966 

Call Stack: 
    0.0002  632656 1. {main}() /Users/waseem/pear/bin/behat:0 
    0.0036 1350424 2. Behat\Behat\Console\BehatApplication->__construct() /Users/waseem/pear/bin/behat:26 
    0.0036 1350504 3. Symfony\Component\Console\Application->__construct() /Users/waseem/pear/share/pear/behat/src/Behat/Behat/Console/BehatApplication.php:32 
    0.0036 1350816 4. Symfony\Component\Console\Application->getDefaultHelperSet() /Users/waseem/pear/share/pear/Symfony/Component/Console/Application.php:75 

을 얻을, 이것은이다 behat 명령을 실행할 때까지 잘 갈 것 같다 왜 이런 일이 벌어 지는지 저를 괴롭히는 것뿐입니다. 나는 기계에 심포니가 없다.

아마도 내가 --alldeps를 설치했기 때문에? 제거하고 다시 시도하고 동일한 문제가 발생했습니다.

답변

0

Behat PEAR channel이 (가) 더 이상 유지 관리되지 않습니다. 최신 Behat 버전 (> = 2.4)은 해당 버전에서 사용할 수 없습니다.

Behat을 설치하는 가장 좋은 방법은 작곡가를 사용하는 것입니다. the original docs을 따르는 것이 좋습니다. 배 방법은 더 이상 목록에 없습니다.

+0

이것은 여전히 ​​Composer를 사용할 때도 발생합니다. –

+0

작곡가를 붙여주세요 .json주세요. 그것은 나를 위해 잘 작동합니다. –

+0

공유 폴더에 Symfony뿐만 아니라 세계적으로 설치되어있는 경우 프로젝트 폴더에 실행 파일을 지정해야합니다. 그래서 퀵 스타트 문서에서'ls_project'에'../bin/behat --init'이 있습니다. –

0

고마워요.하지만 Mac OS X에서 안정적으로 작동해야하는 유일한 방법이며 스노우 보드와 Mountain Lion 모두에서 .phar 설치 방법을 사용하고있었습니다.

보인다 있지만 작곡가 방법 간단

http://docs.behat.org/cookbook/behat_and_mink.html

내가 가진 오류는 다음과 같습니다 그래서이의 Phar 파일을 사용하여에 붙어에서 발견 된 가이드를 다음과 같은 경우 오류를 생산 유지했다.

[Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]              
    Unable to parse file "/Users/waseem/Behat/vendor/behat/mink-extension/src/Behat/MinkExtension/services/sessions/selenium2.xml". 






    [InvalidArgumentException]                                                           
    [ERROR 1840] Element '{http://symfony.com/schema/dic/services}parameter', attribute 'type': [facet 'enumeration'] The value 'integer' is not an element of the set {'collection', 'service', 'string', 'constant'}. (in /Users/waseem/Behat/ - line 20, column 0) 
    [ERROR 1824] Element '{http://symfony.com/schema/dic/services}parameter', attribute 'type': 'integer' is not a valid value of the atomic type '{http://symfony.com/schema/dic/services}parameter_type'. (in /Users/waseem/Behat/ - line 20, column 0) 
0

behat \ autoload_map.php를 살펴보십시오. 이 파일은 Symfony 자동 로더를 찾지 못한 경우이를 대체합니다. 네임 스페이스 \ class를 디렉토리와 파일에 매핑하는 배열을 포함합니다. 몇 가지 추가 사항이 있으면이 버전의 Behat을 사용할 수 있습니다.

다른 사람들이 말했듯이, PEAR 채널이 더 이상 Behat에서 지원되지 않는다면,이 솔루션으로 스스로 해결할 수 있습니다. 개인적으로, 나는 Behat 설치를 최신 상태로 유지하는 또 다른 방법을 모색 할 것이다.