Skip to content

Commit

Permalink
Silence warnings, rather than Exceptions, in resolve_delayed_expectat…
Browse files Browse the repository at this point in the history
…ions
  • Loading branch information
sirbrillig committed Oct 15, 2016
1 parent 2c69bc8 commit d9af05a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Spies/GlobalExpectations.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@ public static function add_expectation( $expectation ) {
}

public static function resolve_delayed_expectations() {
array_map( function( $expectation ) {
foreach ( self::$global_expectations as $expectation ) {
if ( ! $expectation->was_verified ) {
try {
$expectation->verify();
} catch ( \Exception $e ) {
}
$expectation->verify();
}
}, self::$global_expectations );
}
}

public static function clear_all_expectations() {
Expand Down

0 comments on commit d9af05a

Please sign in to comment.