Server IP : 66.29.132.124 / Your IP : 13.59.69.109 Web Server : LiteSpeed System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : wavevlvu ( 1524) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/wavevlvu/book24.ng/vendor/simplesoftwareio/simple-qrcode/tests/DataTypes/ |
Upload File : |
<?php use PHPUnit\Framework\TestCase; use SimpleSoftwareIO\QrCode\DataTypes\WiFi; class WiFiTest extends TestCase { public function setUp(): void { $this->wifi = new Wifi(); } public function test_it_generates_a_proper_format_with_just_the_ssid() { $this->wifi->create([ 0 => [ 'ssid' => 'foo', ], ]); $properFormat = 'WIFI:S:foo;'; $this->assertEquals($properFormat, strval($this->wifi)); } public function test_it_generates_a_proper_format_for_a_ssid_that_is_hidden() { $this->wifi->create([ 0 => [ 'ssid' => 'foo', 'hidden' => 'true', ], ]); $properFormat = 'WIFI:S:foo;H:true;'; $this->assertEquals($properFormat, strval($this->wifi)); } public function test_it_generates_a_proper_format_for_a_ssid_encryption_and_password() { $this->wifi->create([ 0 => [ 'ssid' => 'foo', 'encryption' => 'WPA', 'password' => 'bar', ], ]); $properFormat = 'WIFI:T:WPA;S:foo;P:bar;'; $this->assertEquals($properFormat, strval($this->wifi)); } public function test_it_generates_a_proper_format_for_a_ssid_encryption_password_and_is_hidden() { $this->wifi->create([ 0 => [ 'ssid' => 'foo', 'encryption' => 'WPA', 'password' => 'bar', 'hidden' => 'true', ], ]); $properFormat = 'WIFI:T:WPA;S:foo;P:bar;H:true;'; $this->assertEquals($properFormat, strval($this->wifi)); } }