Skip to content

Commit

Permalink
Added a unittest about adjacent quotes loading.
Browse files Browse the repository at this point in the history
  • Loading branch information
takamin committed Feb 10, 2015
1 parent eeb9f7c commit f23e5b2
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/LoadTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

require_once ("../Spyc.php");

class LoadTest extends PHPUnit_Framework_TestCase {
public function testQuotes() {
$test_values = array(
"adjacent '''' \"\"\"\" quotes.",
"adjacent '''' quotes.",
"adjacent \"\"\"\" quotes.",
);
foreach($test_values as $value) {
$yaml = array($value);
$dump = Spyc::YAMLDump ($yaml);
$yaml_loaded = Spyc::YAMLLoad ($dump);
$this->assertEquals ($yaml, $yaml_loaded);
}
}
}

0 comments on commit f23e5b2

Please sign in to comment.