mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Fixed mutation score by provideing more tests
This commit is contained in:
parent
30bf1c2641
commit
312fc0984b
23
CHANGELOG.md
23
CHANGELOG.md
@ -4,6 +4,29 @@ All notable changes to this project will be documented in this file.
|
|||||||
|
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org).
|
The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org).
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
#### Added
|
||||||
|
|
||||||
|
* *Nothing*
|
||||||
|
|
||||||
|
#### Changed
|
||||||
|
|
||||||
|
* *Nothing*
|
||||||
|
|
||||||
|
#### Deprecated
|
||||||
|
|
||||||
|
* *Nothing*
|
||||||
|
|
||||||
|
#### Removed
|
||||||
|
|
||||||
|
* *Nothing*
|
||||||
|
|
||||||
|
#### Fixed
|
||||||
|
|
||||||
|
* [#362](https://github.com/shlinkio/shlink/issues/362) Fixed all visits without an IP address being processed every time the `visit:process` command is executed.
|
||||||
|
|
||||||
|
|
||||||
## 1.16.0 - 2019-02-23
|
## 1.16.0 - 2019-02-23
|
||||||
|
|
||||||
#### Added
|
#### Added
|
||||||
|
@ -18,4 +18,28 @@ class VisitLocationTest extends TestCase
|
|||||||
$this->assertSame('1000.7', $location->getLatitude());
|
$this->assertSame('1000.7', $location->getLatitude());
|
||||||
$this->assertSame('-2000.4', $location->getLongitude());
|
$this->assertSame('-2000.4', $location->getLongitude());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @test
|
||||||
|
* @dataProvider provideArgs
|
||||||
|
*/
|
||||||
|
public function isEmptyReturnsTrueWhenAllValuesAreEmpty(array $args, bool $isEmpty): void
|
||||||
|
{
|
||||||
|
$payload = new Location(...$args);
|
||||||
|
$location = new VisitLocation($payload);
|
||||||
|
|
||||||
|
$this->assertEquals($isEmpty, $location->isEmpty());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function provideArgs(): iterable
|
||||||
|
{
|
||||||
|
yield [['', '', '', '', 0.0, 0.0, ''], true];
|
||||||
|
yield [['', '', '', '', 0.0, 0.0, 'dd'], false];
|
||||||
|
yield [['', '', '', 'dd', 0.0, 0.0, ''], false];
|
||||||
|
yield [['', '', 'dd', '', 0.0, 0.0, ''], false];
|
||||||
|
yield [['', 'dd', '', '', 0.0, 0.0, ''], false];
|
||||||
|
yield [['dd', '', '', '', 0.0, 0.0, ''], false];
|
||||||
|
yield [['', '', '', '', 1.0, 0.0, ''], false];
|
||||||
|
yield [['', '', '', '', 0.0, 1.0, ''], false];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user