Expand test cases.

This commit is contained in:
James Cole
2021-03-14 06:20:23 +01:00
parent d82fe2ab4c
commit 40a463d62a
33 changed files with 890 additions and 308 deletions

View File

@@ -33,16 +33,6 @@ use Log;
*/
class CurrencyDestroyService
{
/**
* Constructor.
*/
public function __construct()
{
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));
}
}
/**
* @param TransactionCurrency $currency
*/

View File

@@ -38,16 +38,6 @@ use Log;
*/
class JournalDestroyService
{
/**
* Constructor.
*/
public function __construct()
{
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));
}
}
/**
* @param TransactionJournal $journal
*/

View File

@@ -34,16 +34,6 @@ use Log;
*/
class RecurrenceDestroyService
{
/**
* Constructor.
*/
public function __construct()
{
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));
}
}
/**
* Delete recurrence.
*

View File

@@ -46,9 +46,6 @@ class CategoryUpdateService
*/
public function __construct()
{
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));
}
if (auth()->check()) {
$this->user = auth()->user();
}
@@ -71,13 +68,15 @@ class CategoryUpdateService
public function update(Category $category, array $data): Category
{
$oldName = $category->name;
$category->name = $data['name'];
$category->save();
if(array_key_exists('name', $data)) {
$category->name = $data['name'];
$category->save();
// update triggers and actions
$this->updateRuleTriggers($oldName, $data['name']);
$this->updateRuleActions($oldName, $data['name']);
$this->updateRecurrences($oldName, $data['name']);
}
// update triggers and actions
$this->updateRuleTriggers($oldName, $data['name']);
$this->updateRuleActions($oldName, $data['name']);
$this->updateRecurrences($oldName, $data['name']);
$this->updateNotes($category, $data);
return $category;

View File

@@ -33,16 +33,6 @@ use Log;
*/
class CurrencyUpdateService
{
/**
* Constructor.
*/
public function __construct()
{
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));
}
}
/**
* @param TransactionCurrency $currency
* @param array $data

View File

@@ -34,16 +34,6 @@ use RuntimeException;
*/
class PwndVerifierV2 implements Verifier
{
/**
* Constructor.
*/
public function __construct()
{
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));
}
}
/**
* Verify the given password against (some) service.
*