Improve test coverage.

This commit is contained in:
James Cole
2019-08-29 17:53:25 +02:00
parent 91b6b86202
commit 19feefda2d
86 changed files with 3173 additions and 2626 deletions

View File

@@ -55,8 +55,8 @@ class MigrateAttachmentsTest extends TestCase
{
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_migrate_attachments', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_migrate_attachments', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_migrate_attachments', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_migrate_attachments', true]);
// assume all is well.
$this->artisan('firefly-iii:migrate-attachments')
->expectsOutput('All attachments are OK.')
@@ -70,8 +70,8 @@ class MigrateAttachmentsTest extends TestCase
{
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_migrate_attachments', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_migrate_attachments', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_migrate_attachments', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_migrate_attachments', true]);
$attachment = Attachment::create(
[