I'd really like to get PHPUnit working with CI |
[eluser]kenjis[/eluser]
[quote author="belial.seed" date="1313317128"]Hi i´m new to TDD, can you point me towards some information on how to use CIUnit, thanks in advance.[/quote] http://www.foostack.com/foostack/ is the official CIUnit site, but for CI 1.7 https://bitbucket.org/rafsoaken/ciunit is the official repository of current developing CIUnit, but still not work for CI 2.0 https://bitbucket.org/kenjis/my-ciunit is my fork of CIUnit. See also, https://bitbucket.org/kenjis/my-ciunit/wiki/Home
[eluser]mikedfunk[/eluser]
If anyone is trying to get PHPUnit working with Sparks, this is how: http://mikefunk.com/?p=27
[eluser]Unknown[/eluser]
[quote author="hdb92106" date="1320792237"] ... I've discovered that, if I move the phpunit.xml file out of the way, it doesn't hang - I just get the error that CIUnit_TestCase can't be found. So, there's something about the xml config file that throws things off. ... [/quote] To anyone else who might be googling this specific error -- it's possibly a rookie mistake. When running phpunit via the command line, be sure to include the -c flag, so it'll autoload the phpunit.xml file. (The phpunit.xml file has the bootstrap setting defined within it, so classes like CIUnit_TestCase will be loaded.) Code: phpunit -c PATH_TO_TESTS_DIRECTORY Note: using the phpunit.xml file is similar to running Code: phpunit --bootstrap PATH_TO_BOOTSTRAP_PHPUNIT.PHP_FILE PATH_TO_TESTS_DIRECTORY
[eluser]Skotos[/eluser]
According to http://ellislab.com/codeigniter/user-gui...aries.html (Replacing Native Libraries with Your Versions) I should be able to, legitamately, create application/libraries/CI_Session.php to replace CI's Session class. However this has been throwing up errors when using CIUnit as outlined in http://d.hatena.ne.jp/Kenji_s/20120117/1326763908. I have generated the following patch to fix this: Code: --- kenjis-my-ciunit-27a0665997a8/application/third_party/CIUnit/core/CIU_Loader.php 2012-01-18 01:27:00.000000000 +1100 |
Welcome Guest, Not a member yet? Register Sign In |