Commit 15a2aaf 1 parent eec6f77 commit 15a2aaf Copy full SHA for 15a2aaf
File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -40,8 +40,16 @@ public function testDefaults()
40
40
$ mapper = $ this ->createMapper ();
41
41
$ tester = $ mapper ->createSpace ('tester ' );
42
42
$ tester ->addProperty ('id ' , 'unsigned ' );
43
- $ tester ->addProperty ('number ' , 'unsigned ' , ['default ' => 0 ]);
44
- $ tester ->addProperty ('string ' , 'string ' , ['default ' => '' ]);
43
+ $ tester ->addProperty ('number ' , 'unsigned ' , ['default ' => '1 ' ]);
44
+ $ tester ->addProperty ('string ' , 'string ' , ['default ' => 'zzz ' ]);
45
+
46
+ $ tester = $ mapper ->create ('tester ' , []);
47
+ $ this ->assertSame ($ tester ->number , 1 );
48
+ $ this ->assertSame ($ tester ->string , 'zzz ' );
49
+
50
+ $ tester = $ mapper ->create ('tester ' , ['number ' => 2 , 'string ' => 'www ' ]);
51
+ $ this ->assertSame ($ tester ->number , 2 );
52
+ $ this ->assertSame ($ tester ->string , 'www ' );
45
53
}
46
54
47
55
public function testCache ()
You can’t perform that action at this time.
0 commit comments