Skip to content

Commit 7db355b

Browse files
committed
Add test examples for wiki
1 parent ca28c2e commit 7db355b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/AssertTraitTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@
1313

1414
class AssertTraitTest extends \PHPUnit_Framework_TestCase
1515
{
16+
/**
17+
* Showcase for the Wiki
18+
*
19+
* @see https://github.com/estahn/phpunit-json-assertions/wiki/assertJsonMatchesSchema
20+
*/
21+
public function testAssertJsonMatchesSchemaSimple()
22+
{
23+
$content = json_decode(file_get_contents(Utils::getJsonPath('assertJsonMatchesSchema_simple.json')));
24+
25+
AssertTraitImpl::assertJsonMatchesSchema(Utils::getSchemaPath('assertJsonMatchesSchema_simple.schema.json'), $content);
26+
}
27+
1628
public function testAssertJsonMatchesSchema()
1729
{
1830
$content = json_decode('{"foo":123}');

0 commit comments

Comments
 (0)