Skip to content

Commit

Permalink
Test debug mode with a common function
Browse files Browse the repository at this point in the history
  • Loading branch information
monque committed Mar 13, 2017
1 parent 1ba81d7 commit 65ffe37
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
11 changes: 3 additions & 8 deletions extension/tests/skipif.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ function skip($text)

function require_debug_mode()
{
if (!function_exists('trace_start') || !function_exists('trace_end')) {
if (!function_exists('trace_start') ||
!function_exists('trace_end') ||
!function_exists('trace_set_filter')) {
skip('Debug mode is required');
}
}
Expand Down Expand Up @@ -34,10 +36,3 @@ function for_verion_lt($version)
skip('Required version < '.$version);
}
}

function require_trace_filter()
{
if (!function_exists('trace_set_filter')) {
skip("skip trace_set_filter() not exists");
}
}
1 change: 0 additions & 1 deletion extension/tests/trace_015.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ trace.enable=1
<?php
require 'skipif.inc';
require_debug_mode();
require_trace_filter();
?>
--FILE--
<?php
Expand Down
1 change: 0 additions & 1 deletion extension/tests/trace_016.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ trace.enable=1
<?php
require 'skipif.inc';
require_debug_mode();
require_trace_filter();
?>
--FILE--
<?php
Expand Down

0 comments on commit 65ffe37

Please sign in to comment.