Skip to content

Commit

Permalink
Add additional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maximkott committed May 24, 2017
1 parent 15bccee commit ae3fadc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/Weew/JsonEncoder/JsonEncoderTest.php
Expand Up @@ -72,4 +72,15 @@ public function test_decode_null() {
$encoder = new JsonEncoder();
$this->assertEquals(null, $encoder->decode(null));
}

public function test_encode_empty_string() {
$encoder = new JsonEncoder();
$this->setExpectedException(InvalidDataTypeException::class);
$encoder->encode('');
}

public function test_decode_empty_string() {
$encoder = new JsonEncoder();
$this->assertEquals(null, $encoder->decode(''));
}
}

0 comments on commit ae3fadc

Please sign in to comment.