Class 'ZurmoBaseTest' not found in EmailTemplateTest.php - php

I'm trying to run unit tests on zurmo and I've a problem, when I try the EmailTemplateTest. I get
Fatal error: Class 'ZurmoBaseTest' not found in zurmo\app\protected\
modules\emailTemplates\tests\unit\EmailTemplateTest.php on line 42
If I try to include it with require it fixes this, but then
Fatal error: Class 'BaseTest' not found in zurmo\app\protected\modul
es\zurmo\tests\unit\ZurmoBaseTest.php on line 38
and
Fatal error: Class 'RedBeanDatabase' not found in zurmo\app\protecte
d\core\tests\unit\BaseTest.php on line 44
If I include them both I get the final
Fatal error: Class 'Yii' not found in zurmo\app\protected\core\model
s\RedBeanDatabase.php on line 37
What's the problem? Am I supposed to run it from some exact location or the installation is not default. I installed it with the settup and the app is working itself.

You bootstrap is likely missing the autoloader of your framework and / or your framework's PHPUnit extension.

For anyone else looking for the answer to this one. You should run it via TestSuite.php
phpunit TestSuite.php EmailTemplateTest
TestSuite.php will include the necessary files for you.
http://zurmo.org/tutorials/running-unit-tests-explained

Related

Laravel fatal error: Fatal error: Interface 'Illuminate\Auth\Illuminate\Contracts\Auth\Factory' not found

I'm trying to start using laravel php framework. I'm trying to just call the index file and I get this error message.
C:\xampp\php\php.exe C:\xampp\htdocs\tutorials\lara\application\public\index.php
Fatal error: Interface 'Illuminate\Auth\Illuminate\Contracts\Auth\Factory' not found in C:\xampp\htdocs\tutorials\lara\application\bootstrap\cache\compiled.php on line 357
Process finished with exit code 255
Can anyone shine some light on what this means?
Your Illuminate\Auth\Illuminate\Contracts\Auth\Factory may not copied in your project,that why this is happening.So you need to be
Step 1 : Remove full vendor folder
Step 2 : Run from your terminal composer install

PHPUnit autoload, class not found

I am trying to run unit test in crm Zurmo. Following command entered in console produces errors:
phpunit EmailTemplateTest.php
PHP Fatal error: Class 'ZurmoBaseTest' not found in /zurmo/app/protected/modules/emailTemplates/tests/unit/EmailTemplateTest.php on line 38
Fatal error: Class 'ZurmoBaseTest' not found in /zurmo/app/protected/modules/emailTemplates/tests/unit/EmailTemplateTest.php on line 38
I realize that it's problem with autoload, but don't know how resolve this.

Symfony fatal error on vanilla 2.5.5

I've just installed vanilla Symfony 2.5.5 using composer and got fatal error exception by just visiting app_dev.php:
FatalErrorException: Compile Error: Cannot redeclare class Twig_Node_Expression_Binary_Or in /var/www/symfony/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Or.php line 13
and also
Fatal error: Class 'Twig_Node_Expression_Binary_Sub' not found in /var/www/symfony/vendor/twig/twig/lib/Twig/ExpressionParser.php on line 52
I'm totally puzzled. I've grepped through the symfony but didn't find anything suspicious. This never happened to me before and frankly, I don't have idea what might be the cause of this.

Installing php-PhantomJS on localhost

I'm trying to use php-PhantomJS on localhost (XAMPP 1.7.7, PHP: 5.3.8), but I cannot run example files and I'm getting the following error:
Fatal error: Class 'JonnyW\PhantomJs\Client' not found in
C:\xampp\htdocs\read\test\src\a.php on line 4
Class 'PHPUnit_Framework_TestCase' not found in C:\xampp\htdocs\read\test\test\JonnyW\PhantomJs\Test\ClientTest.php on
line 19
Can anybody help in guiding me how to install this script?
Have a look at http://www.thehackeruniversity.com/2014/01/05/getting-started-with-php-composer/
The instructions on that blog should be fairly easy to follow.

Class not found fuelphp oil

i am trying to run fuelphp 1.6 oil on ubuntu server and i get this error message:
PHP Fatal error: Class 'Error' not found in /home/user/public_html/fuel/core/bootstrap.php on line 79
Fatal error: Class 'Error' not found in /home/user/public_html/fuel/core/bootstrap.php on line 79
PHP Fatal error: Class 'Config' not found in /home/user/public_html/fuel/core/bootstrap.php on line 47
Fatal error: Class 'Config' not found in /home/user/public_html/fuel/core/bootstrap.php on line 47
The command i run:
php oil
Any suggestion ?
Probably your autoloader in not correctly configured. This is the first place I would look.
There is nothing to configure in Fuel's autoloader.
FuelPHP uses the COREPATH constant defined in your index.php to find the framework's core classes, and this is defined correctly unless you have changed the location of the files.

Categories