Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add path_ok helper

  • Loading branch information...
commit cdea0fbb9f95354c5012b233b4fcc25cc1d09926 1 parent 3b8d86f
authored January 19, 2012

Showing 1 changed file with 6 additions and 0 deletions. Show diff stats Hide diff stats

  1. 6  src/PHPUnit_TestMore.php
6  src/PHPUnit_TestMore.php
@@ -78,6 +78,12 @@ function file_equals($e,$v,$msg = null)
78 78
     $testobj->assertFileEquals($e,$v,$msg);
79 79
 }
80 80
 
  81
+function path_ok( $path , $msg = null ) {
  82
+    $stacks = debug_backtrace( DEBUG_BACKTRACE_PROVIDE_OBJECT );
  83
+    $testobj = $stacks[1]['object'];
  84
+    $testobj->assertFileExists($path , $msg );
  85
+}
  86
+
81 87
 function dump($e)
82 88
 {
83 89
     var_dump($e);

0 notes on commit cdea0fb

Please sign in to comment.
Something went wrong with that request. Please try again.