Skip to content

Instantly share code, notes, and snippets.

@kagg-design
Created April 7, 2020 13:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kagg-design/266e60bfea4271ed0ede04c081d93c09 to your computer and use it in GitHub Desktop.
Save kagg-design/266e60bfea4271ed0ede04c081d93c09 to your computer and use it in GitHub Desktop.
<?php
use Cyr_To_Lat\Cyr_To_Lat_TestCase;
class Krya {
public function init() {
$overload = new Krya_Overload();
add_action( 'over', [ $overload, 'over_func' ] );
}
}
/**
* Class Krya
*
* @group krya
*/
class Test_Krya extends Cyr_To_Lat_TestCase {
/**
* @runInSeparateProcess
* @preserveGlobalState disabled
*/
public function test_init() {
$overload = \Mockery::mock( 'overload:Krya_Overload' );
\WP_Mock::expectActionAdded( 'over', [ $overload, 'over_func' ] );
$krya = new Krya();
$krya->init(); // It's exception.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment