NuSphere Forums Forum Index
NuSphere Forums
Reply to topic

Do you use TDD and would PHPUnit integration be of use?
Yes
100%
 100%  [ 3 ]
No
0%
 0%  [ 0 ]
Total Votes : 3

PHPUnit and TDD


Joined: 21 Oct 2007
Posts: 14
Reply with quote
I've used PhpEd for several years now, a fully annually paid up user, and I've always enjoyed it's simplicity and power alike.

However, I recently started a short contract and at this place they use TDD (test driven dev) with PHPUnit extensively.

Initially setting up wasn't a problem. I simply used integration to call phpunit via CLI and it worked fine. Brings up a DOS box and runs the unit tests. All ok so far.

Until I was asked to display my coverage report. I was then shown what they use, Netbeans. Netbeans has seemless PHPUnit integration and uses xdebug to aquire coverage information. In fact, coverage was displayed in the editor, executed lines shaded green, missed lines shaded red. It was rather impressive!

Then looking back at PhpEd my co-worker said (use a German accent) "Youz paid forz zis zoftware?"

So I'd like to see PHPUnit integrated into PhpEd in a way that competitors manage to do it (apparently for free too).
View user's profileFind all posts by AjKSend private message


Joined: 18 May 2006
Posts: 61
Reply with quote
FYI, phpUnit integration is already here: http://www.nusphere.com/products/php_testing_phpunit.htm
View user's profileFind all posts by mdegtyarevSend private message


Joined: 09 Dec 2013
Posts: 2
Reply with quote
well, looks like there is still no code coverage support in PHPEd?
Atleast i couldn't find anything, and editing the phpunit.xml to add code-coverage didn't work either.

So is the phpUnit/code-coverage feature in PHPEd still missing ?
View user's profileFind all posts by himmelweissSend private message


Joined: 19 Jul 2006
Posts: 12
Reply with quote
himmelweiss, I also wrote such FR: http://forum.nusphere.com/php-codecoverage-for-phpunit-and-dbg-php-t8954.html.
We can't wait years, so I used workaround: alternative php.ini. Default php.ini loads nuspheres php-dbg, alternative loads universal xdebug.
I made a script phpunit-cc which runs
php -c /usr/local/etc/php-xdebug.ini /usr/local/bin/phpunit --coverage-html tests/report/ $*

(on linux, similar can be achieved on windows using .bat).

Best regards,
Bostjan
View user's profileFind all posts by bzoksSend private message


Joined: 09 Dec 2013
Posts: 2
Reply with quote
well, that's sad...

And they write on their homepage that PHPUnit is seamless integrated?
Half of the config settings for the phpunit.xml do not work :/



Thanks for your reply bzoks, but that's no solution for our office here. As you wrote, it is quite impractical.
View user's profileFind all posts by himmelweissSend private message
PHPUnit and TDD
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic