Instalação do PHPUnit [RESOLVIDO]

1. Instalação do PHPUnit [RESOLVIDO]

Leandro
leandro_gs

(usa Ubuntu)

Enviado em 09/07/2012 - 14:50h

Pessoal, estou precisando instalar o PHPUnit aqui no meu Ubuntu 12.04 mas estou enfrentando alguns problemas. Na documentação oficial, diz que precisa ter o PEAR instalado e configurado e bla bla bla... mas eu não consigo configurar o PEAR para prosseguir com a instalação do PHPUnit.
Estou travado aqui: http://pear.php.net/manual/en/installation.shared.php no "Installing a local copy of PEAR through SSH". Principalmente na parte que diz "Then, if you add ~/pear/bin to your path as the first entry in .bashrc (or whatever your startup file is), and run the command: "

No aguardo ;]


  


2. MELHOR RESPOSTA

Raimundo Alves Portela
rai3mb

(usa Outra)

Enviado em 10/07/2012 - 00:08h

Boas noticias, a instalação via apt funciona, só precisa ser Ronaldo Fenômeno e "não desistir nunca" ;-)

Veja:

> Copie o conteúdo abaixo num arquivo.sh (Exemplo install_phpunit.sh)

sudo apt-get install phpunit
sudo pear upgrade pear
# dependencias
sudo pear channel-discover pear.phpunit.de
sudo pear channel-discover components.ez.no
sudo pear channel-discover pear.symfony-project.com
sudo pear install --alldeps phpunit/PHPUnit


Depois:

chmod +x install_phpunit.sh

E execute o arquivo:

./install_phpunit.sh

Nas 2 primeiras vezes que executei, instalou o phpunit, mas dava o erro quu vc citou ao executar phpunit --version, mas fui Ronaldo e executei mais uma vez, e deu certo!!!!!!!!!!

phpunit --version
PHPUnit 3.6.11 by Sebastian Bergmann.

Referências: http://www.giocc.com/installing-phpunit-on-ubuntu-11-04-natty-narwhal.html


3. Re: Instalação do PHPUnit [RESOLVIDO]

Leandro
leandro_gs

(usa Ubuntu)

Enviado em 09/07/2012 - 15:39h

Só para constar... já realizei alguns procedimentos mais simples encontrados na internet, mas quando dou o comando "$ phpunit" ele me retorna: "PHP Warning: require_once(PHP/CodeCoverage/Filter.php): failed to open stream: No such file or directory in /usr/bin/phpunit on line 38
PHP Fatal error: require_once(): Failed opening required 'PHP/CodeCoverage/Filter.php' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/bin/phpunit on line 38"


4. Re: Instalação do PHPUnit [RESOLVIDO]

Raimundo Alves Portela
rai3mb

(usa Outra)

Enviado em 10/07/2012 - 00:12h

Nas primeiras vezes que executei ao chegar na parte do pear estava dando time out na conexão, então bastou insistir, faça o mesmo ai ;-)!


...
Discovering channel pear.symfony-project.com over http:// failed with message: channel-add: Cannot open "http://pear.symfony-project.com/channel.xml" (Connection to `pear.symfony-project.com:80' failed: Connection timed out)
Trying to discover channel pear.symfony-project.com over https:// instead
Discovery of channel "pear.symfony-project.com" failed (channel-add: Cannot open "https://pear.symfony-project.com/channel.xml" (Connection to `pear.symfony-project.com:443' failed: Connection timed out))
Unknown remote channel: pear.symfony-project.com
...



5. Re: Instalação do PHPUnit [RESOLVIDO]

Leandro
leandro_gs

(usa Ubuntu)

Enviado em 10/07/2012 - 13:56h

Não deu :((


6. Re: Instalação do PHPUnit [RESOLVIDO]

Raimundo Alves Portela
rai3mb

(usa Outra)

Enviado em 10/07/2012 - 21:56h

Só isso??, Informe mais detalhes, tentou várias vezes, apareceu alguma mensagem?


7. Re: Instalação do PHPUnit [RESOLVIDO]

Leandro
leandro_gs

(usa Ubuntu)

Enviado em 10/07/2012 - 22:22h

ele fala que já está instalado, mas continua dando a mesma msg de erro de antes. Sim, eu tentei VÁRIAS vezes...


8. Re: Instalação do PHPUnit [RESOLVIDO]

Raimundo Alves Portela
rai3mb

(usa Outra)

Enviado em 10/07/2012 - 23:04h

Ao fazer a parte da instalação do pear, o que aparece pra vc?


9. Re: Instalação do PHPUnit [RESOLVIDO]

Leandro
leandro_gs

(usa Ubuntu)

Enviado em 17/07/2012 - 15:53h

Precisei formatar a partição com windows ontem e aproveitei para formatar a partição com ubuntu também (pra liberar mais espaço pro windows). Quando fui instalar o phpunit hoje, rodou certinho seguindo os passos que você me orientou primeiro... Obrigado pela ajuda.