Changed capitalisation from JSON to Json to match libraries standards

This commit is contained in:
Alexandre 2011-10-05 00:09:07 -03:00
parent c81b2b75ec
commit 6d042f7c28

View file

@ -0,0 +1,27 @@
<?php
namespace Respect\Validation\Rules;
class JsonTest extends \PHPUnit_Framework_TestCase
{
protected $json;
protected function setUp()
{
$this->json = new Json;
}
public function testValidJSON()
{
$this->assertTrue($this->json->assert('{"foo": "bar", "number":1}'));
}
/**
* @expectedException Respect\Validation\Exceptions\JSONException
*/
public function testInvalidJSON()
{
$this->assertFalse($this->json->assert("{foo:bar}"));
}
}