Updated tests

This commit is contained in:
Henry Whitaker
2020-09-11 01:02:24 +01:00
parent 149c69ce64
commit 8ff87c2e7a
5 changed files with 29 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
# Speedtest Tracker # Speedtest Tracker
[![Docker pulls](https://img.shields.io/docker/pulls/henrywhitaker3/speedtest-tracker?style=flat-square)](https://hub.docker.com/r/henrywhitaker3/speedtest-tracker) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/henrywhitaker3/Speedtest-Tracker/Stable?label=master&logo=github&style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/actions) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/henrywhitaker3/Speedtest-Tracker/Dev?label=dev&logo=github&style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/actions) [![last_commit](https://img.shields.io/github/last-commit/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) [![issues](https://img.shields.io/github/issues/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/issues) [![commit_freq](https://img.shields.io/github/commit-activity/m/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) ![version](https://img.shields.io/badge/version-v1.9.6-success?style=flat-square) [![license](https://img.shields.io/github/license/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/blob/master/LICENSE) [![Docker pulls](https://img.shields.io/docker/pulls/henrywhitaker3/speedtest-tracker?style=flat-square)](https://hub.docker.com/r/henrywhitaker3/speedtest-tracker) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/henrywhitaker3/Speedtest-Tracker/Stable?label=master&logo=github&style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/actions) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/henrywhitaker3/Speedtest-Tracker/Dev?label=dev&logo=github&style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/actions) [![last_commit](https://img.shields.io/github/last-commit/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) [![issues](https://img.shields.io/github/issues/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/issues) [![commit_freq](https://img.shields.io/github/commit-activity/m/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) ![version](https://img.shields.io/badge/version-v1.9.7-success?style=flat-square) [![license](https://img.shields.io/github/license/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/blob/master/LICENSE)
This program runs a speedtest check every hour and graphs the results. The back-end is written in [Laravel](https://laravel.com/) and the front-end uses [React](https://reactjs.org/). It uses the [Ookla's speedtest cli](https://www.speedtest.net/apps/cli) package to get the data and uses [Chart.js](https://www.chartjs.org/) to plot the results. This program runs a speedtest check every hour and graphs the results. The back-end is written in [Laravel](https://laravel.com/) and the front-end uses [React](https://reactjs.org/). It uses the [Ookla's speedtest cli](https://www.speedtest.net/apps/cli) package to get the data and uses [Chart.js](https://www.chartjs.org/) to plot the results.

View File

@@ -1,4 +1,18 @@
{ {
"1.9.7": [
{
"description": "Added option to display minimum values on the top widgets.",
"link": ""
},
{
"description": "New general settings section.",
"link": ""
},
{
"description": "Updated dependencies.",
"link": ""
}
],
"1.9.6": [ "1.9.6": [
{ {
"description": "Clear the cache on restore.", "description": "Clear the cache on restore.",

View File

@@ -7,7 +7,7 @@ return [
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
*/ */
'version' => '1.9.6', 'version' => '1.9.7',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

View File

@@ -27,13 +27,13 @@ class APISpeedtestTest extends TestCase
$dl = []; $dl = [];
$ul = []; $ul = [];
for($i = 0; $i < 3; $i++) { for ($i = 0; $i < 3; $i++) {
$pingVal = $faker->randomFloat(); $pingVal = $faker->randomFloat();
array_push($ping,$pingVal); array_push($ping, $pingVal);
$dlVal = $faker->randomFloat(); $dlVal = $faker->randomFloat();
array_push($dl,$dlVal); array_push($dl, $dlVal);
$ulVal = $faker->randomFloat(); $ulVal = $faker->randomFloat();
array_push($ul,$ulVal); array_push($ul, $ulVal);
Speedtest::create([ Speedtest::create([
'ping' => $pingVal, 'ping' => $pingVal,
@@ -70,7 +70,12 @@ class APISpeedtestTest extends TestCase
'download', 'download',
'upload', 'upload',
], ],
'max' => [ 'maximum' => [
'ping',
'download',
'upload',
],
'minimum' => [
'ping', 'ping',
'download', 'download',
'upload', 'upload',

View File

@@ -19,7 +19,7 @@ class LatestTest extends TestCase
*/ */
private $controller; private $controller;
public function setUp() : void public function setUp(): void
{ {
parent::setUp(); parent::setUp();
@@ -53,6 +53,7 @@ class LatestTest extends TestCase
$this->assertArrayHasKey('data', $resp); $this->assertArrayHasKey('data', $resp);
$this->assertArrayHasKey('average', $resp); $this->assertArrayHasKey('average', $resp);
$this->assertArrayHasKey('max', $resp); $this->assertArrayHasKey('maximum', $resp);
$this->assertArrayHasKey('minimum', $resp);
} }
} }