News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Debuggable Blog:
How To Execute Only Specific Test Methods in CakePHP Unit Tests
June 19, 2008 @ 12:52:45

On the Debuggable blog today, Tim Koschutki shows how you can run just the tests you want on your CakePHP application without having to worry about sorting their results out manually.

Most of us familiar with unit testing with CakePHP and SimpleTest know that SimpleTest always executes all methods starting with the string "test". This can be problematic sometimes. At this point you have two options: create a new testcase, put an "x" before every other test name or use the following tip.

His tip puts another layer on top of the usual testing and uses the getTests method to define with of the tests need to be run. If it's defined, SimpleTest will only execute those.

0 comments voice your opinion now!
simpletest unittest cakephp framework gettests method


blog comments powered by Disqus

Similar Posts

Felix Geisendorfer's Blog: Model::save() now returns an array!

Juan Treminio: Unit Testing Tutorial Part V: Mock Methods and Overriding Constructors

Lars Tesmer's Blog: What My Co-Workers and I Learned When Trying to Write Unit Tests for PHPUnit

Brandon Savage's Blog: Peer Review: Testable Code And Architecture

NetTuts.com: Building a CodeIgniter Web Application From Scratch - Part 1


Community Events

Don't see your event here?
Let us know!


wordpress psr7 library community laravel5 series introduction laravel podcast extension unittest release framework development api voicesoftheelephpant opinion language conference interview

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework