Updated files to v1.9.4

This commit is contained in:
Henry Whitaker
2020-08-25 21:29:12 +01:00
parent c8f853dc84
commit f11d3cf842
45 changed files with 1903 additions and 43 deletions

View File

@@ -0,0 +1,59 @@
<?php
namespace Tests\Unit\Helpers\NotificationsHelper;
use App\Helpers\NotificationsHelper;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
class ThresholdMessageTest extends TestCase
{
/**
* Test absolute message
*
* @return void
*/
public function testAbsoluteMessageMultiField()
{
$msg = NotificationsHelper::formatAbsoluteThresholdMessage([ 'ping', 'upload' ]);
$this->assertEquals('For the latest speedtest, the ping, upload values exceeded the absolute threshold', $msg);
}
/**
* Test absolute message
*
* @return void
*/
public function testAbsoluteMessageSingleField()
{
$msg = NotificationsHelper::formatAbsoluteThresholdMessage([ 'ping' ]);
$this->assertEquals('For the latest speedtest, the ping value exceeded the absolute threshold', $msg);
}
/**
* Test absolute message
*
* @return void
*/
public function testPercentageMessageMultiField()
{
$msg = NotificationsHelper::formatPercentageThresholdMessage([ 'ping', 'upload' ]);
$this->assertEquals('For the latest speedtest, the ping, upload values exceeded the percentage threshold', $msg);
}
/**
* Test absolute message
*
* @return void
*/
public function testPercentageMessageSingleField()
{
$msg = NotificationsHelper::formatPercentageThresholdMessage([ 'ping' ]);
$this->assertEquals('For the latest speedtest, the ping value exceeded the percentage threshold', $msg);
}
}