@@ -10,24 +10,6 @@ enum TestEnum : int
10
10
11
11
class MiscellaneousTest extends \PHPUnit \Framework \TestCase
12
12
{
13
- public function testNullAssignment () : void
14
- {
15
- $ po = new \Tests \App \Record \PurchaseOrder ();
16
- $ po ->payment_method = 'Cash ' ;
17
- $ this ->assertNotNull ($ po ->payment_method );
18
- $ po ->payment_method = null ;
19
- $ this ->assertNull ($ po ->payment_method );
20
- }
21
-
22
- public function testNullAssignmentError () : void
23
- {
24
- $ po = new \Tests \App \Record \PurchaseOrder ();
25
- $ this ->assertIsFloat ($ po ->shipping_fee );
26
- $ this ->assertEquals (0.0 , $ po ->shipping_fee );
27
- $ this ->expectException (\PHPFUI \ORM \Exception::class);
28
- $ po ->shipping_fee = null ;
29
- }
30
-
31
13
public function testEnumCondition () : void
32
14
{
33
15
$ condition = new \PHPFUI \ORM \Condition ('field ' , TestEnum::YES );
@@ -69,6 +51,24 @@ public function testLiteralCondition() : void
69
51
$ this ->assertEquals ('field = invoiceItem.storeItemId ' , (string )$ condition );
70
52
}
71
53
54
+ public function testNullAssignment () : void
55
+ {
56
+ $ po = new \Tests \App \Record \PurchaseOrder ();
57
+ $ po ->payment_method = 'Cash ' ;
58
+ $ this ->assertNotNull ($ po ->payment_method );
59
+ $ po ->payment_method = null ;
60
+ $ this ->assertNull ($ po ->payment_method );
61
+ }
62
+
63
+ public function testNullAssignmentError () : void
64
+ {
65
+ $ po = new \Tests \App \Record \PurchaseOrder ();
66
+ $ this ->assertIsFloat ($ po ->shipping_fee );
67
+ $ this ->assertEquals (0.0 , $ po ->shipping_fee );
68
+ $ this ->expectException (\PHPFUI \ORM \Exception::class);
69
+ $ po ->shipping_fee = null ;
70
+ }
71
+
72
72
public function testRow () : void
73
73
{
74
74
$ row = \PHPFUI \ORM ::getRow ('select * from customer ' );
0 commit comments