PHPUnit のバージョンが少し古くなっています。あなたが最新であることを確認しましょう。してください
pear channel-discover pear.phpunit.de
pear channel-discover components.ez.no
pear channel-discover pear.symfony-project.com
その後
pear install --force --alldeps phpunit/PHPUnit again
これにより、
downloading PHPUnit-3.5.13.tgz ...
Starting to download PHPUnit-3.5.13.tgz (118,553 bytes)
..........................done: 118,553 bytes
install ok: channel://pear.phpunit.de/PHPUnit-3.5.13
エラーがある場合は、PEAR のバージョンを現在のバージョンにアップグレードしてみてください。
pear upgrade-all
PHPActiveRecord のテスト ヘルパーの DocBlock は次のように述べています。
/**
* In order to run these unit tests, you need to install:
* - PHPUnit
* - PEAR Log (otherwise logging SQL queries will be disabled)
* - Memcache (otherwise Caching tests will not be executed)
*
* To run all tests : phpunit AllTests.php --slow-tests
* To run a specific test : phpunit ????Test.php
*/
ただし、ログの依存関係のために、2 つの抑制されたインクルードが含まれています。
@include_once 'Log.php';
@include_once 'Log/file.php';
これが、CLI でまったく結果が得られない理由である可能性があります。
pear install --force --alldeps Log
それでうまくいくはずです。
編集: PHPActiveRecord Web サイトから入手できる 1.0 バージョンには、上記の DocBlock がなくrequire_once
、Log 依存関係を使用します。これは現在のマスター バージョンで変更されているため、ナイトリーを試すか、GitHub からマスター ブランチをチェックアウトすることをお勧めします。