Fix some tests.

This commit is contained in:
James Cole
2019-08-17 11:32:05 +02:00
parent 6d1bfd3956
commit 1d4434698e
4 changed files with 33 additions and 46 deletions

View File

@@ -108,32 +108,6 @@ class NavigationTest extends TestCase
}
}
/**
* @covers \FireflyIII\Support\Navigation
*/
public function testAddPeriodError(): void
{
$tests = [
// period, skip, start, expected end
['bla', 0, '2018-01-01', '2018-01-02'],
];
/** @var array $test */
foreach ($tests as $test) {
$freq = $test[0];
/** @noinspection MultiAssignmentUsageInspection */
$skip = $test[1];
$start = new Carbon($test[2]);
$nav = new Navigation;
try {
$nav->addPeriod($start, $freq, $skip);
} catch (FireflyException $e) {
$this->assertEquals('Cannot do addPeriod for $repeat_freq "bla"', $e->getMessage());
}
}
}
/**
* @covers \FireflyIII\Support\Navigation
*/