File tree Expand file tree Collapse file tree
pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ class InterfaceField extends StringField {
219219 foreach ($ virtual_ips as $ virtual_ip ) {
220220 # Only include CARP virtual iPs with unique IDs
221221 if ($ virtual_ip ['mode ' ] === 'carp ' and $ virtual_ip ['uniqid ' ]) {
222- $ uniqid = " _vip " . $ virtual_ip ['uniqid ' ];
222+ $ uniqid = ' _vip ' . $ virtual_ip ['uniqid ' ];
223223 $ choices [$ uniqid ] = $ uniqid ;
224224 }
225225 }
Original file line number Diff line number Diff line change @@ -85,12 +85,12 @@ class APIFieldsInterfaceFieldTestCase extends TestCase {
8585 public function test_get_interface_choices_with_allow_carp_interface (): void {
8686 # First, create a carp virtual IP to test with
8787 $ vip = new VirtualIP (
88- interface: " lan " ,
89- mode: " carp " ,
90- subnet: " 127.0.0.99 " ,
88+ interface: ' lan ' ,
89+ mode: ' carp ' ,
90+ subnet: ' 127.0.0.99 ' ,
9191 subnet_bits: 32 ,
9292 vhid: 99 ,
93- password: " test "
93+ password: ' test ' ,
9494 );
9595 $ vip ->create ();
9696
Original file line number Diff line number Diff line change @@ -450,7 +450,7 @@ class APIModelsOpenVPNClientExportTestCase extends TestCase {
450450 public function test_create_with_server_tls_user_and_local_database (): void {
451451 # First, update the OpenVPNServer to use the 'server_tls_user' mode and local database auth
452452 $ this ->ovpns ->mode ->value = 'server_tls_user ' ;
453- $ this ->ovpns ->authmode ->value = [" Local Database " ];
453+ $ this ->ovpns ->authmode ->value = [' Local Database ' ];
454454 $ this ->ovpns ->update ();
455455
456456 # Setup the export
@@ -464,10 +464,7 @@ class APIModelsOpenVPNClientExportTestCase extends TestCase {
464464 # Ensure the certref's object ID does NOT match the determined crtid. These should not match because
465465 # pfSense now refers to the crtid as the index of the cert in the system/user config, NOT the cert config
466466 # like usual.
467- $ this ->assert_not_equals (
468- $ this ->user_cert ->refid ->get_related_model ()->id ,
469- $ export ->locate_crtid ()
470- );
467+ $ this ->assert_not_equals ($ this ->user_cert ->refid ->get_related_model ()->id , $ export ->locate_crtid ());
471468
472469 # Ensure we can complete the export as intended and that the embedded cert is correct
473470 $ export ->create ();
Original file line number Diff line number Diff line change @@ -290,23 +290,23 @@ class APIModelsVirtualIPTestCase extends TestCase {
290290 public function test_nested_vip_under_carp_vip (): void {
291291 # Create a CARP virtual IP to test with
292292 $ carp_vip = new VirtualIP (
293- interface: " lan " ,
294- mode: " carp " ,
295- subnet: " 127.0.0.105 " ,
293+ interface: ' lan ' ,
294+ mode: ' carp ' ,
295+ subnet: ' 127.0.0.105 ' ,
296296 subnet_bits: 32 ,
297297 vhid: 105 ,
298- password: " test " ,
299- async: false
298+ password: ' test ' ,
299+ async: false ,
300300 );
301301 $ carp_vip ->create ();
302302
303303 # Create a new IP alias virtual IP that uses the CARP virtual IP as its interface
304304 $ child_vip = new VirtualIP (
305305 interface: "_vip {$ carp_vip ->uniqid ->value }" ,
306- mode: " ipalias " ,
307- subnet: " 127.0.0.106 " ,
306+ mode: ' ipalias ' ,
307+ subnet: ' 127.0.0.106 ' ,
308308 subnet_bits: 32 ,
309- async: false
309+ async: false ,
310310 );
311311 $ child_vip ->create (apply: true );
312312
@@ -315,11 +315,11 @@ class APIModelsVirtualIPTestCase extends TestCase {
315315 $ ifconfig = new Command ("/sbin/ifconfig $ iface " );
316316 $ this ->assert_str_contains (
317317 $ ifconfig ->output ,
318- " inet 127.0.0.105 netmask 0xffffffff broadcast 127.0.0.105 vhid 105 "
318+ ' inet 127.0.0.105 netmask 0xffffffff broadcast 127.0.0.105 vhid 105 ' ,
319319 );
320320 $ this ->assert_str_contains (
321321 $ ifconfig ->output ,
322- " inet 127.0.0.106 netmask 0xffffffff broadcast 127.0.0.106 vhid 105 "
322+ ' inet 127.0.0.106 netmask 0xffffffff broadcast 127.0.0.106 vhid 105 ' ,
323323 );
324324
325325 # Clean up the VIPs we created
You can’t perform that action at this time.
0 commit comments