2013年12月17日火曜日

phpunit+selenium

基本はマニュアルを参考に進めてる
http://phpunit.de/manual/3.7/ja/selenium.html

で、実行時に以下で詰まる

Fatal error: Class 'PHPUnit_Extensions_SeleniumTestSuite' not found in /Users/indival/phpunit/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/Selenium2TestCase.php on line 315

stack見てたら、composerで入れたのとpearで入れたのが、競合してる模様

なので、フルパスで
MAC-B-233:testclass indival$ /usr/local/opt/php54/bin/phpunit WebTest
PHPUnit 3.7.28 by Sebastian Bergmann.

F

Time: 50.68 seconds, Memory: 3.25Mb

There was 1 failure:

1) WebTest::testTitle
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Example WWW Page'
+'求人・転職サイト キュリア転職'

/Users/indival/brew_phpunit/testclass/WebTest.php:15

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.

動いた
テストは失敗しないとおかしいケースにしたのでよし

目標はもっと先なのでどんどん試してみます

0 件のコメント:

コメントを投稿