mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Improve test coverage and fix test code.
This commit is contained in:
@@ -42,16 +42,17 @@ class BillFactoryTest extends TestCase
|
||||
public function testCreateBasic(): void
|
||||
{
|
||||
$data = [
|
||||
'name' => 'Some new bill #' . random_int(1, 10000),
|
||||
'amount_min' => '5',
|
||||
'transaction_currency_id' => 1,
|
||||
'amount_max' => '10',
|
||||
'date' => '2018-01-01',
|
||||
'repeat_freq' => 'monthly',
|
||||
'skip' => 0,
|
||||
'automatch' => true,
|
||||
'active' => true,
|
||||
'notes' => 'Hello!',
|
||||
'name' => 'Some new bill #' . random_int(1, 10000),
|
||||
'amount_min' => '5',
|
||||
'currency_id' => 1,
|
||||
'currency_code' => '',
|
||||
'amount_max' => '10',
|
||||
'date' => '2018-01-01',
|
||||
'repeat_freq' => 'monthly',
|
||||
'skip' => 0,
|
||||
'automatch' => true,
|
||||
'active' => true,
|
||||
'notes' => 'Hello!',
|
||||
];
|
||||
|
||||
/** @var BillFactory $factory */
|
||||
@@ -81,7 +82,8 @@ class BillFactoryTest extends TestCase
|
||||
'amount_max' => '10',
|
||||
'date' => '2018-01-01',
|
||||
'repeat_freq' => 'monthly',
|
||||
'transaction_currency_id' => 1,
|
||||
'currency_id' => 1,
|
||||
'currency_code' => '',
|
||||
'skip' => 0,
|
||||
'automatch' => true,
|
||||
'active' => true,
|
||||
|
||||
@@ -162,7 +162,7 @@ class VersionCheckEventHandlerTest extends TestCase
|
||||
|
||||
// report on config variables:
|
||||
FireflyConfig::shouldReceive('get')->withArgs(['last_update_check', Mockery::any()])->once()->andReturn($checkConfig);
|
||||
FireflyConfig::shouldReceive('set')->withArgs(['last_update_check', Mockery::any()])->once()->andReturn($checkConfig);
|
||||
//FireflyConfig::shouldReceive('set')->withArgs(['last_update_check', Mockery::any()])->once()->andReturn($checkConfig);
|
||||
|
||||
$handler = new VersionCheckEventHandler;
|
||||
$handler->checkForUpdates($event);
|
||||
|
||||
Reference in New Issue
Block a user