Skip to content

Commit

Permalink
Add skip function
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Jan 18, 2012
1 parent 3b8d86f commit e50d9b7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/PHPUnit_TestMore.php
Expand Up @@ -6,6 +6,10 @@
* file that was distributed with this source code.
*/

/* php 5.3.3 does not support this */
if( ! defined('DEBUG_BACKTRACE_PROVIDE_OBJECT') )
define( 'DEBUG_BACKTRACE_PROVIDE_OBJECT' , null );

function ok( $v , $msg = null )
{
$stacks = debug_backtrace( DEBUG_BACKTRACE_PROVIDE_OBJECT );
Expand Down Expand Up @@ -49,6 +53,13 @@ function count_ok( $expected,$v, $msg = null )
$testobj->assertCount( $expected , $v , $msg );
}

function skip( $msg )
{
$stacks = debug_backtrace( DEBUG_BACKTRACE_PROVIDE_OBJECT );
$testobj = $stacks[1]['object'];
$testobj->markTestSkipped( $msg );
}


function like( $e, $v , $msg = null )
{
Expand Down Expand Up @@ -85,3 +96,4 @@ function dump($e)
}



0 comments on commit e50d9b7

Please sign in to comment.