add default value to php model

This commit is contained in:
wing328
2015-12-08 15:59:46 +08:00
parent b122107a80
commit 4b656c516f
3 changed files with 53 additions and 13 deletions

View File

@@ -42,7 +42,7 @@ public class PhpModelTest {
Assert.assertEquals(property1.baseName, "id");
Assert.assertEquals(property1.datatype, "int");
Assert.assertEquals(property1.name, "id");
Assert.assertEquals(property1.defaultValue, "null");
Assert.assertEquals(property1.defaultValue, null);
Assert.assertEquals(property1.baseType, "int");
Assert.assertTrue(property1.hasMore);
Assert.assertTrue(property1.required);
@@ -53,7 +53,7 @@ public class PhpModelTest {
Assert.assertEquals(property2.baseName, "name");
Assert.assertEquals(property2.datatype, "string");
Assert.assertEquals(property2.name, "name");
Assert.assertEquals(property2.defaultValue, "null");
Assert.assertEquals(property2.defaultValue, null);
Assert.assertEquals(property2.baseType, "string");
Assert.assertTrue(property2.hasMore);
Assert.assertTrue(property2.required);
@@ -65,7 +65,7 @@ public class PhpModelTest {
Assert.assertEquals(property3.complexType, "\\DateTime");
Assert.assertEquals(property3.datatype, "\\DateTime");
Assert.assertEquals(property3.name, "created_at");
Assert.assertEquals(property3.defaultValue, "null");
Assert.assertEquals(property3.defaultValue, null);
Assert.assertEquals(property3.baseType, "\\DateTime");
Assert.assertNull(property3.hasMore);
Assert.assertNull(property3.required);
@@ -92,7 +92,7 @@ public class PhpModelTest {
Assert.assertEquals(property1.baseName, "id");
Assert.assertEquals(property1.datatype, "int");
Assert.assertEquals(property1.name, "id");
Assert.assertEquals(property1.defaultValue, "null");
Assert.assertEquals(property1.defaultValue, null);
Assert.assertEquals(property1.baseType, "int");
Assert.assertTrue(property1.hasMore);
Assert.assertTrue(property1.required);