Improve test coverage.

This commit is contained in:
James Cole
2019-07-31 16:53:09 +02:00
parent 5524941c90
commit 9b574ce7ad
155 changed files with 1890 additions and 2263 deletions

View File

@@ -46,11 +46,11 @@ use Session;
/**
* Class EventServiceProvider.
* @codeCoverageIgnore
*/
class EventServiceProvider extends ServiceProvider
{
/**
* @codeCoverageIgnore
* The event listener mappings for the application.
*
* @var array
@@ -103,7 +103,6 @@ class EventServiceProvider extends ServiceProvider
];
/**
* @codeCoverageIgnore
* Register any events for your application.
*/
public function boot(): void
@@ -119,7 +118,7 @@ class EventServiceProvider extends ServiceProvider
{
// in case of repeated piggy banks and/or other problems.
PiggyBank::created(
function (PiggyBank $piggyBank) {
static function (PiggyBank $piggyBank) {
$repetition = new PiggyBankRepetition;
$repetition->piggyBank()->associate($piggyBank);
$repetition->startdate = $piggyBank->startdate;
@@ -129,7 +128,7 @@ class EventServiceProvider extends ServiceProvider
}
);
Client::created(
function (Client $oauthClient) {
static function (Client $oauthClient) {
/** @var UserRepositoryInterface $repository */
$repository = app(UserRepositoryInterface::class);
$user = $repository->findNull((int)$oauthClient->user_id);

View File

@@ -50,7 +50,7 @@ use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\Services\Currency\ExchangeRateInterface;
use FireflyIII\Services\IP\IpifyOrg;
use FireflyIII\Services\IP\IPRetrievalInterface;
use FireflyIII\Services\Password\PwndVerifierV2;
use FireflyIII\Services\Password\PwndVerifierV3;
use FireflyIII\Services\Password\Verifier;
use FireflyIII\Support\Amount;
use FireflyIII\Support\ExpandedForm;
@@ -183,7 +183,7 @@ class FireflyServiceProvider extends ServiceProvider
$this->app->bind(ExchangeRateInterface::class, $class);
// password verifier thing
$this->app->bind(Verifier::class, PwndVerifierV2::class);
$this->app->bind(Verifier::class, PwndVerifierV3::class);
// IP thing:
$this->app->bind(IPRetrievalInterface::class, IpifyOrg::class);