mirror of
https://github.com/Respect/Validation.git
synced 2024-06-27 17:50:13 +02:00
Changed capitalisation from JSON to Json to match libraries standards
This commit is contained in:
parent
c81b2b75ec
commit
6d042f7c28
27
tests/library/Respect/Validation/Rules/JsonTest.php
Normal file
27
tests/library/Respect/Validation/Rules/JsonTest.php
Normal 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}"));
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue