@@ -63,20 +63,15 @@ class APIModelsRESTAPIAccessListEntryTestCase extends TestCase {
6363 $ entry ->update ();
6464
6565 # Ensure the entry was updated
66- $ this ->assert_equals (
67- RESTAPIAccessListEntry::query (id: $ entry ->id )
68- ->first ()
69- ->to_representation (),
70- [
71- 'id ' => $ entry ->id ,
72- 'type ' => 'deny ' ,
73- 'weight ' => 15 ,
74- 'network ' => '1.2.3.4/32 ' ,
75- 'users ' => ['admin ' ],
76- 'sched ' => $ sched2 ->name ->value ,
77- 'descr ' => 'New test entry ' ,
78- ],
79- );
66+ $ this ->assert_equals (RESTAPIAccessListEntry::query (id: $ entry ->id )->first ()->to_representation (), [
67+ 'id ' => $ entry ->id ,
68+ 'type ' => 'deny ' ,
69+ 'weight ' => 15 ,
70+ 'network ' => '1.2.3.4/32 ' ,
71+ 'users ' => ['admin ' ],
72+ 'sched ' => $ sched2 ->name ->value ,
73+ 'descr ' => 'New test entry ' ,
74+ ]);
8075
8176 # Update the entry again
8277 $ entry ->from_representation (
@@ -90,20 +85,15 @@ class APIModelsRESTAPIAccessListEntryTestCase extends TestCase {
9085 $ entry ->update ();
9186
9287 # Ensure the entry was updated
93- $ this ->assert_equals (
94- RESTAPIAccessListEntry::query (id: $ entry ->id )
95- ->first ()
96- ->to_representation (),
97- [
98- 'id ' => $ entry ->id ,
99- 'type ' => 'allow ' ,
100- 'weight ' => 20 ,
101- 'network ' => '4.3.2.1/24 ' ,
102- 'users ' => [],
103- 'sched ' => '' ,
104- 'descr ' => 'Another test entry ' ,
105- ],
106- );
88+ $ this ->assert_equals (RESTAPIAccessListEntry::query (id: $ entry ->id )->first ()->to_representation (), [
89+ 'id ' => $ entry ->id ,
90+ 'type ' => 'allow ' ,
91+ 'weight ' => 20 ,
92+ 'network ' => '4.3.2.1/24 ' ,
93+ 'users ' => [],
94+ 'sched ' => '' ,
95+ 'descr ' => 'Another test entry ' ,
96+ ]);
10797
10898 # Delete the entry and associated schedules
10999 $ entry ->delete ();
0 commit comments