Silexと同様にphpunit3.6.12をインストールしています。私のアプリのルートディレクトリには、簡単なテストファイルBlogFunctionTest.phpを含むテストディレクトリがあります。
<?
use Silex\WebTestCase;
// BLOG: Front end test
class BlogFunctionalTest extends Silex\WebTestCase
{
public function testIndex()
{
$this->assertGreaterThan(0, 1);
}
}
?>
コマンドラインからphpunitを実行すると、エラーが発生します
PHP Fatal error: Class 'Silex\WebTestCase' not found in {path}/BlogFunctionTest.php line 7
これは、WebTestCaseを拡張しようとしている行を指します。交換しても同じことが起こります
use Silex\WebTestCase;
と
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
Silexは、私のテストファイルに関連してインストールされています。
../vendor/silex/
ヒントは大歓迎です、ありがとう!