WP_Mock Test Case
use WP_Mock\Tools\TestCase as TestCase;
final class MyTestCase extends TestCase
{
// ...
}Methods
Assert conditions met
use WP_Mock\Tools\TestCase as TestCase;
final class MyTestCase extends TestCase
{
public function testMyFunction() : void
{
WP_Mock::userFunction('my_function', ['times' => 1]);
$this->assertConditionsMet();
}
}Assert equals HTML
Expect output string
Mock static method
Access inaccessible class members
Get or invoke an inaccessible method
Handle inaccessible properties
Last updated