PHPUnit_Framework_BaseTestListenerクラスが見つかりません

I am trying to run a PHPunit test for my extension but I keep
getting the following error:
Fatal error: Class 'PHPUnit_Framework_BaseTestListener' not
found in
C:xampphtdocsmyDrupalsitesitesallmodulescivicrmCiviTestCiviTestListener.php
on line 17

Any ideas on how I can fix this?
I am using CiviCRM 4.7
CMS is Drupal 7
My system OS is Windows 10. My extension is placed in
sites/default/files/civicrm/ext
My test directory was created using civix
generate:test
on the Windows command prompt.
I run the tests using PHPUnit via the command prompt in the root
directory of my extension.

ベストアンサー

これは、phpunitのバージョンの不一致のように聞こえる:

  • Currently, most of the Civi testing runs against the PHAR build
    of phpunit v4.
  • phpunit v6 renames every class to use
    instead of _, which means that all the
    base-classes disappear if you run on a newer build of phpunit.

返信を残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です