Improve test coverage.

This commit is contained in:
James Cole
2019-06-10 20:14:00 +02:00
parent 8efb73694d
commit 2ab9d2e6ee
75 changed files with 4672 additions and 484 deletions

View File

@@ -80,9 +80,8 @@ class ReportEmptyObjects extends Command
/** @var stdClass $entry */
foreach ($set as $entry) {
$name = $entry->name;
$line = 'User #%d (%s) has account #%d ("%s") which has no transactions.';
$line = sprintf($line, $entry->user_id, $entry->email, $entry->id, $name);
$line = sprintf($line, $entry->user_id, $entry->email, $entry->id, $entry->name);
$this->line($line);
}
}
@@ -125,13 +124,12 @@ class ReportEmptyObjects extends Command
/** @var stdClass $entry */
foreach ($set as $entry) {
$objName = $entry->name;
$line = sprintf(
'User #%d (%s) has budget #%d ("%s") which has no transaction journals.',
$entry->user_id,
$entry->email,
$entry->id,
$objName
$entry->name
);
$this->line($line);
}
@@ -151,14 +149,12 @@ class ReportEmptyObjects extends Command
/** @var stdClass $entry */
foreach ($set as $entry) {
$objName = $entry->name;
$line = sprintf(
'User #%d (%s) has category #%d ("%s") which has no transaction journals.',
$entry->user_id,
$entry->email,
$entry->id,
$objName
$entry->name
);
$this->line($line);
}
@@ -178,14 +174,13 @@ class ReportEmptyObjects extends Command
/** @var stdClass $entry */
foreach ($set as $entry) {
$objName = $entry->tag;
$line = sprintf(
'User #%d (%s) has tag #%d ("%s") which has no transaction journals.',
$entry->user_id,
$entry->email,
$entry->id,
$objName
$entry->tag
);
$this->line($line);
}

View File

@@ -30,6 +30,7 @@ use Artisan;
/**
* Class ReportIntegrity
* @codeCoverageIgnore
*/
class ReportIntegrity extends Command
{