Fix some tests for account API

This commit is contained in:
James Cole
2021-03-13 12:01:01 +01:00
parent 668b169a5e
commit 7118abe28d
29 changed files with 992 additions and 315 deletions

View File

@@ -41,9 +41,6 @@ class FireflyConfig
*/
public function delete(string $name): void
{
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s("%s") should NOT be called in the TEST environment!', __METHOD__, $name));
}
$fullName = 'ff-config-' . $name;
if (Cache::has($fullName)) {
Cache::forget($fullName);
@@ -75,9 +72,6 @@ class FireflyConfig
*/
public function get(string $name, $default = null): ?Configuration
{
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s("%s") should NOT be called in the TEST environment!', __METHOD__, $name));
}
$fullName = 'ff-config-' . $name;
if (Cache::has($fullName)) {
return Cache::get($fullName);
@@ -111,9 +105,7 @@ class FireflyConfig
*/
public function getFresh(string $name, $default = null): ?Configuration
{
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should NOT be called in the TEST environment!', __METHOD__));
}
$config = Configuration::where('name', $name)->first(['id', 'name', 'data']);
if ($config) {
@@ -135,9 +127,6 @@ class FireflyConfig
*/
public function put(string $name, $value): Configuration
{
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should NOT be called in the TEST environment!', __METHOD__));
}
return $this->set($name, $value);
}
@@ -151,9 +140,6 @@ class FireflyConfig
*/
public function set(string $name, $value): Configuration
{
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should NOT be called in the TEST environment!', __METHOD__));
}
/** @var Configuration $config */
try {
$config = Configuration::whereName($name)->first();