help with phpunit

Hello,
I am new to PhpStorm but so far I've been very impressed by it, so thank you for the wonderful tool!
I want to start using unit testing for my code, something I've never done before and don't know much about at all.
so I tried to understand how to use the phpunit tool and after a lot of tutorials and guides that never seem to be complete and get me lost half way I decided to start from scratch and ask for help here.
I am using windows xp if that matters..php version 5.2.6
i ran the pear file.. as some guides said to do..  but I seem to be missing files and folders.. like phpunit_skelgen.bat (if only i knew what that was and where).. something just doesn't click together.
so i want to start again from the beginning,
can someone please help me step by step to get phpunit up and running?

your guide here says that first i need to get the phpunit tool from here https://github.com/sebastianbergmann/phpunit/ (version 3.6)
i downloaded, but where do i put the folder? what do i do with it?

next question, Chapter 3 installing phpunit says "The following two commands (which you may have to run as

root
) are all that is required to install PHPUnit using the PEAR Installer:
pear config-set auto_discover 1
pear install pear.phpunit.de/PHPUnit"




C:\Documents and Settings\my_username>cd c:\

C:\>cd \php

C:\PHP>cd pear

C:\PHP\PEAR>pear config-set auto discover 1
config-set: only the layers: "user" or "system" are supported

C:\PHP\PEAR>pear install pear.phpunit.de/PHPUnit
Attempting to discover channel "pear.phpunit.de"...
downloading channel.xml ...
Starting to download channel.xml (804 bytes)
....done: 804 bytes
Channel "pear.phpunit.de" is not initialized, use "pear channel-discover pear.ph
punit.de" to initializeor pear config-set auto_discover 1
unknown channel "pear.phpunit.de" in "pear.phpunit.de/PHPUnit"
invalid package name/package file "pear.phpunit.de/PHPUnit"
install failed

C:\PHP\PEAR>pear channel-discover pear.phpunit.de
Adding Channel "pear.phpunit.de" succeeded
Discovery of channel "pear.phpunit.de" succeeded

C:\PHP\PEAR>pear install pear.phpunit.de/PHPUnit
Unknown remote channel: pear.symfony-project.com
Did not download optional dependencies: pear/Image_GraphViz, pear/Log, channel:/
/pear.symfony-project.com/YAML, use --alldeps to download automatically
phpunit/PHPUnit can optionally use package "pear/Image_GraphViz" (version >= 1.2
.1)
phpunit/PHPUnit can optionally use package "pear/Log"
phpunit/PHPUnit can optionally use package "channel://pear.symfony-project.com/Y
AML" (version >= 1.0.2)
phpunit/PHPUnit can optionally use PHP extension "pdo"
phpunit/PHPUnit can optionally use PHP extension "pdo_mysql"
phpunit/PHPUnit can optionally use PHP extension "pdo_sqlite"
phpunit/PHPUnit can optionally use PHP extension "soap"
phpunit/PHPUnit can optionally use PHP extension "xdebug" (version >= 2.0.5)
downloading PHPUnit-3.4.15.tgz ...
Starting to download PHPUnit-3.4.15.tgz (255,036 bytes)
.................................done: 255,036 bytes
install ok: channel://pear.phpunit.de/PHPUnit-3.4.15

C:\PHP\PEAR>

1 comment
Comment actions Permalink

private private,

Do you still have any issues with PHPUnit integration?

Thanks!

0

Please sign in to leave a comment.