Created
June 19, 2015 17:53
-
-
Save sirbrillig/8068dc2483f00a310291 to your computer and use it in GitHub Desktop.
WP_Mock do_action failure
This file contains hidden or 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
{ | |
"require-dev": { | |
"10up/wp_mock": "dev-master" | |
} | |
} |
This file contains hidden or 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 | |
function my_wp_function() { | |
do_action( 'foo', 'bar' ); | |
} | |
class MyTest extends PHPUnit_Framework_TestCase | |
{ | |
public function setUp() { | |
\WP_Mock::setUp(); | |
} | |
public function tearDown() { | |
\WP_Mock::tearDown(); | |
} | |
public function testRunsCorrectly() | |
{ | |
my_wp_function(); | |
$this->assertEquals(1, 1); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment