-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add markdownify and basic unit tests for YAML and Markdown output
- Loading branch information
Josh Kadis
committed
Dec 21, 2016
1 parent
66c35ae
commit a432b13
Showing
4 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "Markdownify"] | ||
path = Markdownify | ||
url = [email protected]:Elephant418/Markdownify.git |
Submodule Markdownify
added at
016067
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
class HH_Hugo_Test_Dependencies extends WP_UnitTestCase { | ||
function test_installed() { | ||
$this->assertTrue( function_exists( 'yaml_emit' ) ); | ||
$this->assertTrue( class_exists( '\\Markdownify\\ConverterExtra' ) ); | ||
} | ||
|
||
function test_basic() { | ||
// Basic Markdownify functionality | ||
$converter = new Markdownify\ConverterExtra; | ||
$markdown = $converter->parseString('<h1>Test</h1>'); | ||
$this->assertEquals( '# Test', $markdown ); | ||
|
||
// Basic YAML output | ||
$yaml = yaml_emit( array( 'test' => 'test output', 'foo' => array( 'bar' ) ) ); | ||
$this->assertEquals( $yaml, "---\ntest: test output\nfoo:\n- bar\n...\n" ); | ||
} | ||
} |