Browse files

Add skip function

  • Loading branch information...
1 parent 3b8d86f commit e50d9b76afc9516bd01f4a4eb42f7947ceda7808 @c9s committed Jan 19, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/PHPUnit_TestMore.php
View
12 src/PHPUnit_TestMore.php
@@ -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 );
@@ -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 )
{
@@ -85,3 +96,4 @@ function dump($e)
}
+

0 comments on commit e50d9b7

Please sign in to comment.