phpunit-testingphpunitsimpletest

SimpleTest vs PHPunit


I was wondering if anyone that has experience in both this stuff can shed some light on the significant difference between the two if any?

Any specific strength of each that makes it suitable for any specific case?


Solution

  • I'm really really baffled that SimpleTest still is considered an alternative to PHPUnit. Maybe I'm just misinformed but as far as I've seen:

    I've yet to see any argument in favor of SimpleTest. It's not even simpler to install since PHPUnit is available via pear:

    pear channel-discover pear.phpunit.de
    pear install phpunit/PHPUnit
    

    and the "first test" looks pretty much the same.

    As of PHPUnit 3.7 it's even easier to install it by just using the PHAR Archive

    wget http://pear.phpunit.de/get/phpunit.phar
    chmod +x phpunit-3.7.6.phar
    

    or for Windows just downloading the phar and running:

    php phpunit-.phar
    

    or when using the supported composer install ways like

    "require-dev": {
        "phpunit/phpunit": "3.7.*"
    }
    

    to your composer.json.


    For everything you want to test PHPUnit will have a solution and you will be able to find help pretty much anywhere (Stack Overflow, the #phpunit IRC channel on Freenode, pretty much every PHP developer)


    Full disclosure

    I've originally written this answer in Jan 2011 when I had no affiliation with any PHP Testing project. Since then I have become a contributor to PHPUnit.