Skip to content

Commit

Permalink
add deprecated function
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor authored Jul 24, 2024
1 parent b4f156f commit d0e06f6
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions features/bootstrap/FunctionsContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,22 @@ public function iExpectWhenIRunWithArgs( $return, $function, TableNode $args ) {
\PHPUnit\Framework\Assert::assertEquals( $return, call_user_func_array( $function, $args->getRow( 0 ) ) );
}

/**
* @Then I expect :return when I run :function
*/
public function iExpectWhenIRun( $return, $function ) {
$this->iExpectWhenIRunWithArgs( $return, $function, new TableNode( array( array() ) ) );
}

/**
* @Then I expect :return when I run :function
*
* @deprected use static::iExpectWhenIRun instead
*/
public function iExcpectWhenIRun( $return, $function ) {
static::iExpectWhenIRun( $return, $function )
}

/**
* @Then I expect :return when I run :function
*/
public function iExpectWhenIRun( $return, $function ) {
$this->iExpectWhenIRunWithArgs( $return, $function, new TableNode( array( array() ) ) );
}

/**
* @Then I expect an error when I run :function with args:
*/
Expand Down

0 comments on commit d0e06f6

Please sign in to comment.