From 28675969d8db6e48ee9ecb0a24d98a96fa283d17 Mon Sep 17 00:00:00 2001 From: Bill li Date: Sun, 27 May 2018 17:25:28 +0800 Subject: [PATCH] K --- tests/IdentityCardTest.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/IdentityCardTest.php b/tests/IdentityCardTest.php index 0d340da..8011242 100644 --- a/tests/IdentityCardTest.php +++ b/tests/IdentityCardTest.php @@ -4,10 +4,24 @@ class IdentityCardTest extends PHPUnit\Framework\TestCase { - public function testMake() + public function testMakeIdentityCardInstance() { $idCard = IdentityCard::make('142701198003124054'); $this->assertEquals(IdentityCard::class, get_class($idCard)); } + + public function testMakeFalse() + { + $idCard = IdentityCard::make(''); + + $this->assertEquals(false, $idCard); + } + + public function testToJson() + { + $idCard = IdentityCard::make('142701198003124054'); + + $this->assertJson($idCard->toJson()); + } } \ No newline at end of file