Instantly share code, notes, and snippets.

Embed
What would you like to do?
Snippet from helloTestableTest.php
<?php
public function testInit()
{
$dummy = new \stdClass();
$hello = new helloTestable($dummy);
\WP_Mock::expectActionAdded('admin_notices', array($hello, 'echoLyric'));
\WP_Mock::expectActionAdded('admin_head', array($hello, 'echoCss'));
$hello->init();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment