Skip to content

Commit

Permalink
Update TestCase
Browse files Browse the repository at this point in the history
  • Loading branch information
unfulvio-godaddy committed Jan 3, 2023
1 parent ba60763 commit 3b66359
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions php/WP_Mock/Tools/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,29 @@ public function expectOutputString(string $expectedString): void
parent::expectOutputString($expectedString);
}

public function assertCurrentConditionsMet($message = '')
/**
* Asserts that the current test conditions have been met.
*
* @deprecated prefer {@see TestCase::assertConditionsMet())
*
* @param string $message
* @return void
*/
public function assertCurrentConditionsMet(string $message = ''): void
{
$this->assertThat(null, new ExpectationsMet(), $message);
$this->assertConditionsMet($message);
}

public function assertConditionsMet($message = '')
/**
* Asserts that the current test conditions have been met.
*
* @param string $message
* @return void
*/
public function assertConditionsMet(string $message = ''): void
{
$this->assertCurrentConditionsMet($message);
/** @phpstan-ignore-next-line it will never throw an exception */
$this->assertThat(null, new ExpectationsMet(), $message);
}

/**
Expand Down

0 comments on commit 3b66359

Please sign in to comment.