mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2025-12-24 06:28:27 +01:00
Added unit tests for helpers and tests for commands
This commit is contained in:
38
tests/Unit/Helpers/SettingsHelper/SettingsGetTest.php
Normal file
38
tests/Unit/Helpers/SettingsHelper/SettingsGetTest.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit\Helpers\SettingsHelper;
|
||||
|
||||
use App\Helpers\SettingsHelper;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Tests\TestCase;
|
||||
|
||||
class SettingsGetTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
/**
|
||||
* A basic feature test example.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testValidSetting()
|
||||
{
|
||||
$response = SettingsHelper::get('auth');
|
||||
|
||||
$this->assertNotFalse($response);
|
||||
$this->assertFalse((bool)$response->value);
|
||||
}
|
||||
|
||||
/**
|
||||
* A basic feature test example.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testInvalidSetting()
|
||||
{
|
||||
$response = SettingsHelper::get('test');
|
||||
|
||||
$this->assertFalse($response);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user