pjvleeuw Posted February 14, 2012 Posted February 14, 2012 Dear all, Could anybody explain me how I can use PHPUnit. The PHPUnit installation tutorial (here: http://www.phpunit.d...stallation.html ) states I should run some command-line commands, which I (understandably) cannot do on HelioHost. Via the cPanel PEAR section I installed PHPUnit2 version 2.3.6. Maybe worth nothing that according to http://pear.phpunit.de/ the current version is 3.6.10 and 2.3.6 is quite old. The only options I found when searching for "phpunit" via cPanel were 1.3.2 and 2.3.6. Now when I run a script starting with require_once 'PHPUnit2/Framework/TestCase.php';then PHP gives me the message: Warning: require_once(PHPUnit2/Framework/TestCase.php) [function.require-once]: failed to open stream: No such file or directory in /home/pjvleeuw/public_html/ctr/tests.php on line 2 Via FTP I checked, the file /home/pjvleeuw/php/PHPUnit2/Framework/TestCase.php does exist, but apparently (checked via phpinfo() ) the include_path is set to ".:/usr/lib/php:/usr/local/lib/php". I am not sure but when I install something via the PEAR section on cPanel, where is that supposed to go and should that path be included automatically? I'd rather not hard-code a path anywhere in my PHP, that is exactly what the PEAR mechanism (from what I understand so far) aims to avoid. So my question boils down to:* I can imagine other PHP developers using PHPUnit, so it might be worthwhile to make this available by default / system wide?* if not, please help me set this up property, I searched a lot but I am stuck, please help Hope hearing.Many thanks for reading. Best regards,Paul Quote
pjvleeuw Posted February 14, 2012 Author Posted February 14, 2012 I noticed the folder /home/pjvleeuw/php/.channels/with in it (among others) __uri.reg In the above mentioned installation instructions it is stated:" The PEAR channel (pear.phpunit.de) that is used to distribute PHPUnit needs to be registered with the local PEAR environment: pear channel-discover pear.phpunit.de This has to be done only once. Now the PEAR Installer can be used to install packages from the PHPUnit channel: pear install phpunit/PHPUnit" Has anybody worked with this on HelioHost before? Could I add the channel manually somewhere, and how would I go about grabbing the newest version of PHPUnit? I am a bit afraid that I brick my installation (or at least break it such that I do not know how to fix it): I already did too much trial and error via the cPanel... Any help is much appreciated! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.