Yii Framework Forum: Phpunit Phar - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Phpunit Phar Rate Topic: -----

#1 User is offline   Keith 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,598
  • Joined: 04-March 10
  • Location:UK

Posted 21 June 2014 - 05:30 AM

I installed PHPUnit in the phar format as seems to be the recommended method on their site. This package comes with all of the dependencies and extra packages bundled into a single file.

When trying to run unit tests through Yii, the following require_once lines are causing errors, because the files don't exist:

CWebTestCase
require_once('PHPUnit/Extensions/SeleniumTestCase.php');


CTestCase
require_once('PHPUnit/Runner/Version.php');
require_once('PHPUnit/Util/Filesystem.php'); // workaround for PHPUnit <= 3.6.11
require_once('PHPUnit/Autoload.php');


This applies to Yii 1.1.14 and the current development version.

Could this be avoided by simply checking if those classes are already defined before using require_once?

I've commented out those lines as a short term workaround.

EDIT:
When trying to perform an assertion, I got another warning from Yii's autoloader:

PHP Warning:  include(PHPUnit_Extensions_Story_TestCase.php): failed to open stream: No such file or directory in /home/keith/Dev/Web/Yii/framework/YiiBase.php on line 427


I've turned off error reporting for now. as the failed inclusions don't prevent the tests from running.
0

#2 User is offline   Keith 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,598
  • Joined: 04-March 10
  • Location:UK

Posted 24 June 2014 - 06:23 AM

Shall I put this in the bug tracker? I'm assuming it's a legitimate bug as nobody's told me I'm stupid yet. :P
0

#3 User is offline   Keith 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,598
  • Joined: 04-March 10
  • Location:UK

Posted 25 June 2014 - 04:59 AM

Done.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users