![]() |
| PHPUnit integration... |
|
Hi,
I just wanted to share the string to use in order to integrate PHPEd with PHPUnit. For assumptions please read the section on assumptions. 1. Start Nusphere PHPEd 2. In the menu select: Select Tools > Settings 3. In the Settings dialog select: Tools > Integration 4. Select "Add menu" 5. Write PHPUnit 6. Select Edit 7. In "Execute with" select "Shell" 8. In "Command line" paste the following (or if you have installed PEAR to a different path - please update).
9. In Shortcut: E.g. __press__: Ctrl+Shift+T 10. Check "Show this command in Workspace popup" and check "for files". 11. Check "Show this command in Explorer popup" and check "for files". 12. Check "Show this command in Tools menu" 13. Check "Show this command in File Bar popup" 14. Check "Show this commanf for local files only" 15. Select "Redirect Output stream to log window" 16. Press Close and OK. 17. In the Workspace or Explorer window in NuSphere you may now right-click a file and select PHPUnit. If you open the file you might even press Shift+Ctrl+T to execute PHPUnit. 18. Verify the output in the log-window. Assumptions The instructions above assumes the following: * NuSphere TechPlatform, PHP, PEAR and PHPUnit is installed on the system * All PHPUnit-testfiles have the same class-name as filename. * That Ctrl+Shift+T is availale as short-cut (default key mapping is for <td></td>). You can remove the key mapping by: * Go to Tools > Settings > Editor > Editor shortcuts * Scroll all the way down to <td> and select it * Press delete to remove the key-mapping.
Edit: If you install PHPUnit with the PEAR Installer (and registered the path to PEAR in Windows environment variables) and you have added the PEAR-libraries to the include_path in php.ini you may shorten the above string to:
For more information see: - http://www.phpunit.de/wiki Best Regards, Jan Bolmeson |
||||||||||||||||||
|
|
|||||||||||||||||||
|
Site Admin
|
applauds!
|
||||||||||||
|
_________________ The PHP IDE team |
|||||||||||||
|
Site Admin
|
slightly updated instructions:
install phpunit In order to install phpunit for php shipped with PhpED open cmd console and type the following commands:
add PHPUnit command 1. Start Nusphere PHPEd 2. In the menu select: Select Tools > Settings 3. In the Settings dialog select: Tools > Integration 4. Select "Add menu" 5. Write PHPUnit 6. Select Edit 7. In "Execute with" select "Shell" 8. In "Command line" paste the following (or if you have installed PEAR to a different path - please update).
9. In Shortcut: E.g. __press__: Ctrl+Shift+T 10. Check "Show this command in Workspace popup" and check "for files". 11. Check "Show this command in Explorer popup" and check "for files". 12. Check "Show this command in Tools menu" 13. Check "Show this command in File Bar popup" 14. Check "Show this commanf for local files only" 15. Select "Redirect Output stream to log window" and "Redirect Error stream to log window" 16. Press Close and OK. verifying the results 1. create the following file in phped:
2. save it under test1.php name 3. right click on the test1.php file tab and select "PHPUnit" 4. open log winodow (View->Tabs->Log) and make sure that it contains testcase output, like below:
|
||||||||||||||||||||
|
_________________ The PHP IDE team |
|||||||||||||||||||||
| PHPUnit integration... |
|
||
|
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.


RSS2 Feed