Skip to content

Instantly share code, notes, and snippets.

@eriktorsner eriktorsner/LyricsTest.php
Last active Apr 25, 2017

What would you like to do?
Snippet from LyricsTest.php
public function testGetLyric()
$file = dirname(__DIR__) . '/fixtures/lyrics.txt';
$lyrics = new Lyrics($file);
\WP_Mock::userFunction('wptexturize', array(
'return' => function($s) {
return $s . ' wptexturize';
$line = $lyrics->getLyric();
$parts = explode(' ', $line);
$this->assertEquals('line', $parts[0]);
$this->assertEquals('wptexturize', $parts[2]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.