Created
April 7, 2020 13:52
-
-
Save kagg-design/266e60bfea4271ed0ede04c081d93c09 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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