Instantly share code, notes, and snippets.

Embed
What would you like to do?
Snippet from helloTestableTest.php
<?php
public function testEchoCss()
{
\WP_Mock::userFunction('is_rtl', array(
'return_in_order' => array(true, false),
));
$dummy = new \stdClass();
$hello = new helloTestable($dummy);
$this->expectOutputRegex('/.*float: left*./');
$hello->echoCss();
$this->expectOutputRegex('/.*float: right*./');
$hello->echoCss();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment