お世話になります、composer.pharの置いてあるパスにcomposer.jsonを置いてphp composer.phar installを実行したのですが、
phpunit -v
を叩くと、php composer.phar installする前から入れてあるバージョンのphpunitのバージョンが表示されてしまいます。
また、composer.jsonに書いた
"phpunit/phpunit-selenium": ">=1.2"
も反映されていないようで、
phpunit WebTest.php
とすると、
PHP Warning: require_once(PHPUnit/Extensions/SeleniumTestCase.php): failed to open stream: No such file or directory in /var/www/html/WebTest.php on line 2
PHP Fatal error: require_once(): Failed opening required 'PHPUnit/Extensions/SeleniumTestCase.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/WebTest.php on line 2
とエラーになってしまいます。
どのようにすればphpunitのバージョンが変わりますでしょうか?
WebTest.php↓
php
1<?php 2require_once 'PHPUnit/Extensions/SeleniumTestCase.php'; 3 4class WebTest extends PHPUnit_Extensions_SeleniumTestCase 5{ 6 protected $captureScreenshotOnFailure = TRUE; 7 protected $screenshotPath = '/var/www/localhost/htdocs/screenshots'; 8 protected $screenshotUrl = 'http://localhost/screenshots'; 9 10 protected function setUp() 11 { 12 $this->setBrowser('*firefox'); 13 $this->setBrowserUrl('http://www.example.com/'); 14 } 15 16 public function testTitle() 17 { 18 $this->open('http://www.example.com/'); 19 $this->assertTitle('Example WWW Page'); 20 } 21} 22
composer.json抜粋↓
"require": {
"php": ">=5.2.8", "phpunit/phpunit-selenium": ">=1.2"
},
"require-dev": {
"phpunit/php-invoker": "",
"phpunit/dbunit": ">=1.2",
"phpunit/phpunit": "3.7.",
"cakephp/debug_kit" : "2.2.*"
},
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。