![]() |
![]() | PHPEd and PHPUnit - Project Contains No Tests | ![]() |
![]() |
![]() | ![]() |
Site Admin
![]() |
![]() |
I'm not sure what you mean. PhpED follows logic of phpUnit and finds tests in all files that have certain pattern, then filters classes that also have certain pattern. Class names don't have to match filenames. Say, if you have file abc.php and it contains class cba, it won't be found neither by phpUnit nor by PhpED, right? |
|||||||||||||
_________________ The PHP IDE team
|
![]() |
![]() | PHPED and PHPUNIT INTEGRATION HOW IT WORKS? | ![]() |
![]() |
![]() |
Hi,
I am new in PHPUnit. I would like to use it from PHPED 17. It seems something wrong. I don't know if I need PEAR. WHat I read is no longer needed. I have the right path for PHUNIT in settings and my projects. I have configured a folder for test. I create a simple example in test folder but the testunit suit inform there is no test available. SO, it seems somthiong wrong. I will try to use phpunit from command line but it would be more confortable for the IDE. Could you help me? |
|||||||||||
|
![]() |
![]() | ![]() |
Site Admin
![]() |
![]() |
You don't need PEAR, it's not used anymore. What you need is php sufficiently new (see phpUnit requireements for the phpUnit version you configured)
I'd recommend you to try sample from https://phpunit.de/manual/current/en/writing-tests-for-phpunit.html Save the following code into testStack.php file in the folder you created:
Then open Tools->Show Test Suite (F6) and click Run All button. |
|||||||||||||
_________________ The PHP IDE team
|
![]() |
![]() | ![]() |
![]() |
![]() |
Thanks dimitri.
Now it works. The main problem - my fault - is I must start each test method with test. I didn't do that. So, public function mytest() { } doesn't work. It works public function testmytest() {} My second goal is use bootrap due I using autoload class based on namespace. I am a bit stacked hahah |
|||||||||||
|
![]() |
![]() | PHPEd and PHPUnit - Project Contains No Tests | ![]() |
|
||
![]() |
![]() |
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
