PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, August 31, 2022

[FIXED] how to do unit testing with phpstorm and zend framework?

 August 31, 2022     pear, php, phpstorm, phpunit, zend-framework     No comments   

Issue

i am trying to run some testing on my framework with phpstorm.

i am working with xampp and i have php unit installed.

the framework is located:

C:\xampp\htdocs\zend\zend\application\
C:\xampp\htdocs\zend\zend\library\
C:\xampp\htdocs\zend\zend\library\zend\...
...

the php interpreter i set up is php 5.4.4

when i run the testing i get

C:\xampp\php\php.exe C:\Users\test\AppData\Local\Temp\ide-phpunit.php --no-configuration C:\xampp\htdocs\zend\zend Testing started at 2:24 PM ...

Warning: require_once(Zend/Cache/Backend/ExtendedInterface.php): failed to open stream: No such file or directory in C:\xampp\htdocs\zend\zend\library\Zend\Cache\Backend\Test.php on line 27

Fatal error: require_once(): Failed opening required 'Zend/Cache/Backend/ExtendedInterface.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\zend\zend\library\Zend\Cache\Backend\Test.php on line 27

Process finished with exit code 255

in Test.php in the zend library there is an include require_once 'Zend/Cache/Backend/ExtendedInterface.php'; and it seems that the ide can't figure out the path.

any ideas on this issue?

thanks


Solution

You need to configure additional include paths. I suggest you do that with your project settings. To do that, double click External Libraries External Libraries at the end of the Project Tool Window.

When you call the unit tests, PHPStorm will automatically add those.

Just add the Zend Framework path as an include path and you should have solved these problems.



Answered By - hakre
Answer Checked By - Katrina (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing