From b1ecf10fff2e58f52bdf99649355528c203864be Mon Sep 17 00:00:00 2001 From: Lucas Vinicius Date: Fri, 7 Apr 2023 11:45:26 -0300 Subject: [PATCH] refactor: Move tests to Test\ namespace --- .phpunit.cache/test-results | 1 + composer.json | 2 +- phpunit.xml.dist | 56 +++++++------------ .../Mocks/Database/Factories/UserFactory.php | 4 +- tests/Mocks/Models/User.php | 4 +- .../Concerns/ExpiresAndHasGraceDaysTest.php | 4 +- tests/Models/Concerns/ExpiresTest.php | 4 +- .../Models/Concerns/HandlesRecurrenceTest.php | 4 +- .../Models/Concerns/HasSubscriptionsTest.php | 6 +- tests/Models/Concerns/StartsTest.php | 4 +- tests/Models/Concerns/SuppressesTest.php | 6 +- tests/Models/FeaturePlanTest.php | 4 +- tests/Models/FeatureTest.php | 4 +- tests/Models/PlanTest.php | 4 +- tests/Models/SubscriptionTest.php | 6 +- tests/Scopes/ExpiringScopeTest.php | 4 +- .../Scopes/ExpiringWithGraceDaysScopeTest.php | 4 +- tests/Scopes/StartingScopeTest.php | 4 +- tests/Scopes/SuppressingScopeTest.php | 4 +- tests/TestCase.php | 2 +- 20 files changed, 57 insertions(+), 74 deletions(-) create mode 100644 .phpunit.cache/test-results diff --git a/.phpunit.cache/test-results b/.phpunit.cache/test-results new file mode 100644 index 0000000..5dc8d4f --- /dev/null +++ b/.phpunit.cache/test-results @@ -0,0 +1 @@ +{"version":1,"defects":[],"times":{"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\ExpiringWithGraceDaysScopeTest::testExpiredModelsWithGraceDaysAreReturnedByDefault":0.014,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\ExpiringWithGraceDaysScopeTest::testExpiredModelsAreNotReturnedWhenCallingMethodWithExpiredAndPassingFalse":0.011,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\ExpiringWithGraceDaysScopeTest::testExpiredModelsAreNotReturnedByDefault":0.01,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\ExpiringWithGraceDaysScopeTest::testOnlyExpiredModelsAreReturnedWhenCallingMethodOnlyExpired":0.017,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\ExpiringWithGraceDaysScopeTest::testExpiredModelsAreReturnedWhenCallingMethodWithExpired":0.01,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\FeatureTest::testModelCalculateDailyExpiration":0.004,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\FeatureTest::testModelcalculateNextRecurrenceEndConsideringRecurrences":0.004,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\FeatureTest::testModelCalculateWeeklyExpiration":0.005,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\FeatureTest::testModelCalculateYearlyExpiration":0.005,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\FeatureTest::testModelCalculateMonthlyExpiration":0.004,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\FeatureTest::testModelIsNotQuotaByDefault":0.004,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\SuppressingScopeTest::testOnlySuppressedModelsAreReturnedWhenCallingMethodOnlyNotSuppressed":0.01,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\SuppressingScopeTest::testSuppressedModelsAreNotReturnedByDefault":0.014,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\SuppressingScopeTest::testSuppressedModelsAreReturnedWhenCallingMethodWithNotSuppressedAndPassingAFalse":0.011,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\SuppressingScopeTest::testSuppressedModelsAreNotReturnedWhenCallingWithoutNotSuppressed":0.008,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\SuppressingScopeTest::testSuppressedModelsAreReturnedWhenCallingMethodWithNotSuppressed":0.013,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\ExpiresTest::testExpiredModelsAreReturnedWhenCallingMethodWithExpired":0.008,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\ExpiresTest::testModelsWithoutExpirationDateAreReturnedByDefault":0.006,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\ExpiresTest::testModelReturnsNotExpiredStatus":0.005,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\ExpiresTest::testModelReturnsExpiredStatus":0.005,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\ExpiresTest::testOnlyExpiredModelsAreReturnedWhenCallingMethodOnlyExpired":0.007,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\ExpiresTest::testExpiredModelsAreNotReturnedByDefault":0.013,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HandlesRecurrenceTest::testModelCalculateWeeklyExpiration":0.005,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HandlesRecurrenceTest::testModelCalculateExpirationWithADifferentStartAsString":0.006,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HandlesRecurrenceTest::testModelCalculateDailyExpiration":0.005,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HandlesRecurrenceTest::testModelCalculateYearlyExpiration":0.004,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HandlesRecurrenceTest::testModelCalculateExpirationWithADifferentStart":0.004,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HandlesRecurrenceTest::testModelCalculateMonthlyExpiration":0.004,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\ExpiringScopeTest::testExpiredModelsAreNotReturnedByDefault":0.011,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\ExpiringScopeTest::testOnlyExpiredModelsAreReturnedWhenCallingMethodOnlyExpired":0.007,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\ExpiringScopeTest::testExpiredModelsAreReturnedWhenCallingMethodWithExpired":0.008,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\ExpiringScopeTest::testExpiredModelsAreNotReturnedWhenCallingMethodWithExpiredAndPassingFalse":0.007,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\ExpiresAndHasGraceDaysTest::testModelReturnsIfItHasNotExpired":0.008,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\ExpiresAndHasGraceDaysTest::testTraitAppliesScope":0.004,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\ExpiresAndHasGraceDaysTest::testModelReturnsExpiredStatus":0.007,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\ExpiresAndHasGraceDaysTest::testModelReturnsIfItHasExpired":0.009,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\ExpiresAndHasGraceDaysTest::testModelReturnsNotExpiredStatus":0.006,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\PlanTest::testModelCanRetrieveSubscriptions":0.006,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\PlanTest::testModelCancalculateGraceDaysEnd":0.004,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelGetCurrentSubscriptionAfterScheduleASwitch":0.014,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItRaisesAnExceptionWhenCreatingATicketForANonExistingFeature":0.005,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCanSubscribeToAPlan":0.005,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelDefinesGraceDaysEnd":0.006,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItChecksIfTheUserHasSubscriptionToAPlan":0.008,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItFiresEventWhenCreatingATicket":0.005,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCanConsumeSomeAmountOfAConsumableFeatureFromATicket":0.011,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItDoesNotCreateNewConsumptionsForQuoeFeatures":0.011,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelGetNewSubscriptionAfterSwitching":0.012,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItIgnoresTicketsWhenItIsDisabled":0.011,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCantUseChargesFromExpiredTickets":0.018,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelHasFeatureTickets":0.012,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelFeatureTicketsGetsOnlyNotExpired":0.005,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCanRetrieveTotalChargesForAFeatureConsideringTickets":0.009,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItDoesNotReturnNegativeChargesForFeatures":0.011,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCanConsumeSomeAmountOfAConsumableFeatureIfItsConsumptionsAreExpired":0.01,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCanRetrieveTotalConsumptionsForAFeature":0.01,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItReturnsTheLastSubscriptionWhenRetrievingExpired":0.006,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItCanConsumeAFeatureAfterItsChargesIfThisFeatureIsPostpaid":0.011,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItRaisesAnExceptionWhenCreatingATicketDespiteItIsDisabled":0.004,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCantConsumeSomeAmountOfAConsumableFeatureFromAnExpiredSubscription":0.008,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItChecksIfTheUserDoesNotHaveSubscriptionToAPlan":0.008,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCanScheduleSwitchToAPlan":0.013,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItCanCreateANonExpirableTicket":0.009,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelGetFeaturesFromTickets":0.008,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCanConsumeANotConsumableFeatureFromATicket":0.007,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCanRetrieveRemainingChargesForAFeature":0.01,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItReturnsRemainingChargesOnlyForTheGivenUser":0.008,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCanConsumeSomeAmountOfAConsumableFeature":0.012,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCantConsumeAnUnavailableFeature":0.008,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCantConsumeAFeatureBeyondItsCharges":0.008,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelHasSubscriptionRenewals":0.009,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCanConsumeAFeature":0.009,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItCanSetQuotaFeatureConsumption":0.018,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItReturnsNegativeBalanceForFeatures":0.009,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCanConsumeANotConsumableFeatureIfItIsAvailable":0.012,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCanSwitchToAPlan":0.011,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItCanCreateATicket":0.006,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCantConsumeSomeAmountOfAConsumableFeature":0.012,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelGetFeaturesFromNonExpirableTickets":0.009,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItRaisesAnExceptionWhenSettingConsumedQuotaForANotQuotaFeature":0.008,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItCreateANotExpirableConsumptionForQuotaFeatures":0.01,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\StartingScopeTest::testNotStartedModelsAreNotReturnedByDefault":0.011,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\StartingScopeTest::testNotStartedModelsAreNotReturnedWhenCallingWithoutNotStarted":0.013,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\StartingScopeTest::testStartedModelsAreReturnedWhenCallingMethodWithNotStarted":0.01,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\StartingScopeTest::testNotStartedModelsAreReturnedWhenCallingMethodWithNotStartedAndPassingAFalse":0.012,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\StartingScopeTest::testOnlyStartedModelsAreReturnedWhenCallingMethodOnlyNotStarted":0.013,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\FeaturePlanTest::testModelCanRetrieveFeature":0.024,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\FeaturePlanTest::testModelCanRetrievePlan":0.006,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\StartsTest::testModelReturnsNotStartedWhenStartedAtIsNull":0.004,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\StartsTest::testModelReturnsNotStartedWhenStartedAtIsOnTheFuture":0.004,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\Concerns\\StartsTest::testModelReturnsStartedWhenStartedAtIsOnThePast":0.01,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\SubscriptionTest::testModelReturnsExpiredSubscriptionsInNotActiveScope":0.011,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\SubscriptionTest::testModelReturnsNotStartedSubscriptionsInNotActiveScope":0.007,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\SubscriptionTest::testModelCanCancel":0.008,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\SubscriptionTest::testModelReturnsOnlyNotCanceledSubscriptionsWithTheScope":0.011,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\SubscriptionTest::testModelCanStart":0.006,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\SubscriptionTest::testModelReturnsOnlyCanceledSubscriptionsWithTheScope":0.009,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\SubscriptionTest::testModelCanMarkAsSwitched":0.006,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\SubscriptionTest::testModelCanSuppress":0.006,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\SubscriptionTest::testModelRegistersRenewal":0.006,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\SubscriptionTest::testModelConsidersGraceDaysOnOverdue":0.007,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\SubscriptionTest::testModelRegistersOverdue":0.006,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\SubscriptionTest::testModelReturnsSuppressedSubscriptionsInNotActiveScope":0.01,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\SubscriptionTest::testModelRenews":0.008,"LucasDotVin\\Soulbscription\\Tests\\Feature\\Models\\SubscriptionTest::testModelRenewsBasedOnCurrentDateIfOverdue":0.007,"Tests\\Feature\\Models\\ExpiringWithGraceDaysScopeTest::testExpiredModelsAreNotReturnedWhenCallingMethodWithExpiredAndPassingFalse":0.03,"Tests\\Feature\\Models\\ExpiringWithGraceDaysScopeTest::testExpiredModelsWithGraceDaysAreReturnedByDefault":0.012,"Tests\\Feature\\Models\\ExpiringWithGraceDaysScopeTest::testOnlyExpiredModelsAreReturnedWhenCallingMethodOnlyExpired":0.022,"Tests\\Feature\\Models\\ExpiringWithGraceDaysScopeTest::testExpiredModelsAreReturnedWhenCallingMethodWithExpired":0.013,"Tests\\Feature\\Models\\ExpiringWithGraceDaysScopeTest::testExpiredModelsAreNotReturnedByDefault":0.008,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCanRetrieveRemainingChargesForAFeature":0.017,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelGetCurrentSubscriptionAfterScheduleASwitch":0.012,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelHasSubscriptionRenewals":0.008,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItChecksIfTheUserDoesNotHaveSubscriptionToAPlan":0.008,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItChecksIfTheUserHasSubscriptionToAPlan":0.008,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCantConsumeAFeatureBeyondItsCharges":0.008,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelDefinesGraceDaysEnd":0.005,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCanSubscribeToAPlan":0.008,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCantConsumeSomeAmountOfAConsumableFeatureFromAnExpiredSubscription":0.008,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelGetFeaturesFromNonExpirableTickets":0.007,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItRaisesAnExceptionWhenCreatingATicketForANonExistingFeature":0.005,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItReturnsRemainingChargesOnlyForTheGivenUser":0.009,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItReturnsNegativeBalanceForFeatures":0.009,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItDoesNotCreateNewConsumptionsForQuoeFeatures":0.01,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelGetFeaturesFromTickets":0.008,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCanConsumeSomeAmountOfAConsumableFeature":0.009,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCanConsumeANotConsumableFeatureFromATicket":0.007,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItRaisesAnExceptionWhenSettingConsumedQuotaForANotQuotaFeature":0.015,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCanSwitchToAPlan":0.009,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItFiresEventWhenCreatingATicket":0.005,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItCanSetQuotaFeatureConsumption":0.011,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelHasFeatureTickets":0.006,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItDoesNotReturnNegativeChargesForFeatures":0.008,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItReturnsTheLastSubscriptionWhenRetrievingExpired":0.01,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCanRetrieveTotalConsumptionsForAFeature":0.009,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItIgnoresTicketsWhenItIsDisabled":0.011,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCanRetrieveTotalChargesForAFeatureConsideringTickets":0.009,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCanConsumeAFeature":0.008,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCanConsumeANotConsumableFeatureIfItIsAvailable":0.008,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItRaisesAnExceptionWhenCreatingATicketDespiteItIsDisabled":0.004,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelFeatureTicketsGetsOnlyNotExpired":0.007,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCanConsumeSomeAmountOfAConsumableFeatureFromATicket":0.009,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCanConsumeSomeAmountOfAConsumableFeatureIfItsConsumptionsAreExpired":0.011,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItCanCreateANonExpirableTicket":0.005,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItCanCreateATicket":0.006,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCanScheduleSwitchToAPlan":0.009,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCantConsumeAnUnavailableFeature":0.007,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItCreateANotExpirableConsumptionForQuotaFeatures":0.009,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCantConsumeSomeAmountOfAConsumableFeature":0.01,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelGetNewSubscriptionAfterSwitching":0.011,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testItCanConsumeAFeatureAfterItsChargesIfThisFeatureIsPostpaid":0.011,"Tests\\Feature\\Models\\Concerns\\HasSubscriptionsTest::testModelCantUseChargesFromExpiredTickets":0.012,"Tests\\Feature\\Models\\StartingScopeTest::testOnlyStartedModelsAreReturnedWhenCallingMethodOnlyNotStarted":0.017,"Tests\\Feature\\Models\\StartingScopeTest::testNotStartedModelsAreReturnedWhenCallingMethodWithNotStartedAndPassingAFalse":0.013,"Tests\\Feature\\Models\\StartingScopeTest::testNotStartedModelsAreNotReturnedWhenCallingWithoutNotStarted":0.01,"Tests\\Feature\\Models\\StartingScopeTest::testNotStartedModelsAreNotReturnedByDefault":0.018,"Tests\\Feature\\Models\\StartingScopeTest::testStartedModelsAreReturnedWhenCallingMethodWithNotStarted":0.012,"Tests\\Feature\\Models\\SubscriptionTest::testModelConsidersGraceDaysOnOverdue":0.008,"Tests\\Feature\\Models\\SubscriptionTest::testModelReturnsSuppressedSubscriptionsInNotActiveScope":0.011,"Tests\\Feature\\Models\\SubscriptionTest::testModelCanStart":0.006,"Tests\\Feature\\Models\\SubscriptionTest::testModelReturnsOnlyCanceledSubscriptionsWithTheScope":0.013,"Tests\\Feature\\Models\\SubscriptionTest::testModelCanSuppress":0.007,"Tests\\Feature\\Models\\SubscriptionTest::testModelReturnsOnlyNotCanceledSubscriptionsWithTheScope":0.011,"Tests\\Feature\\Models\\SubscriptionTest::testModelReturnsExpiredSubscriptionsInNotActiveScope":0.007,"Tests\\Feature\\Models\\SubscriptionTest::testModelRegistersRenewal":0.01,"Tests\\Feature\\Models\\SubscriptionTest::testModelRenews":0.007,"Tests\\Feature\\Models\\SubscriptionTest::testModelRenewsBasedOnCurrentDateIfOverdue":0.007,"Tests\\Feature\\Models\\SubscriptionTest::testModelCanCancel":0.006,"Tests\\Feature\\Models\\SubscriptionTest::testModelReturnsNotStartedSubscriptionsInNotActiveScope":0.01,"Tests\\Feature\\Models\\SubscriptionTest::testModelRegistersOverdue":0.007,"Tests\\Feature\\Models\\SubscriptionTest::testModelCanMarkAsSwitched":0.005,"Tests\\Feature\\Models\\Concerns\\ExpiresTest::testModelReturnsExpiredStatus":0.005,"Tests\\Feature\\Models\\Concerns\\ExpiresTest::testModelsWithoutExpirationDateAreReturnedByDefault":0.008,"Tests\\Feature\\Models\\Concerns\\ExpiresTest::testOnlyExpiredModelsAreReturnedWhenCallingMethodOnlyExpired":0.006,"Tests\\Feature\\Models\\Concerns\\ExpiresTest::testModelReturnsNotExpiredStatus":0.005,"Tests\\Feature\\Models\\Concerns\\ExpiresTest::testExpiredModelsAreNotReturnedByDefault":0.013,"Tests\\Feature\\Models\\Concerns\\ExpiresTest::testExpiredModelsAreReturnedWhenCallingMethodWithExpired":0.009,"Tests\\Feature\\Models\\FeatureTest::testModelCalculateYearlyExpiration":0.005,"Tests\\Feature\\Models\\FeatureTest::testModelIsNotQuotaByDefault":0.005,"Tests\\Feature\\Models\\FeatureTest::testModelCalculateWeeklyExpiration":0.004,"Tests\\Feature\\Models\\FeatureTest::testModelcalculateNextRecurrenceEndConsideringRecurrences":0.004,"Tests\\Feature\\Models\\FeatureTest::testModelCalculateDailyExpiration":0.005,"Tests\\Feature\\Models\\FeatureTest::testModelCalculateMonthlyExpiration":0.005,"Tests\\Feature\\Models\\PlanTest::testModelCanRetrieveSubscriptions":0.008,"Tests\\Feature\\Models\\PlanTest::testModelCancalculateGraceDaysEnd":0.004,"Tests\\Feature\\Models\\Concerns\\HandlesRecurrenceTest::testModelCalculateWeeklyExpiration":0.004,"Tests\\Feature\\Models\\Concerns\\HandlesRecurrenceTest::testModelCalculateExpirationWithADifferentStartAsString":0.004,"Tests\\Feature\\Models\\Concerns\\HandlesRecurrenceTest::testModelCalculateExpirationWithADifferentStart":0.004,"Tests\\Feature\\Models\\Concerns\\HandlesRecurrenceTest::testModelCalculateYearlyExpiration":0.005,"Tests\\Feature\\Models\\Concerns\\HandlesRecurrenceTest::testModelCalculateDailyExpiration":0.008,"Tests\\Feature\\Models\\Concerns\\HandlesRecurrenceTest::testModelCalculateMonthlyExpiration":0.004,"Tests\\Feature\\Models\\ExpiringScopeTest::testOnlyExpiredModelsAreReturnedWhenCallingMethodOnlyExpired":0.006,"Tests\\Feature\\Models\\ExpiringScopeTest::testExpiredModelsAreNotReturnedByDefault":0.01,"Tests\\Feature\\Models\\ExpiringScopeTest::testExpiredModelsAreReturnedWhenCallingMethodWithExpired":0.008,"Tests\\Feature\\Models\\ExpiringScopeTest::testExpiredModelsAreNotReturnedWhenCallingMethodWithExpiredAndPassingFalse":0.011,"Tests\\Feature\\Models\\FeaturePlanTest::testModelCanRetrievePlan":0.006,"Tests\\Feature\\Models\\FeaturePlanTest::testModelCanRetrieveFeature":0.009,"Tests\\Feature\\Models\\Concerns\\StartsTest::testModelReturnsStartedWhenStartedAtIsOnThePast":0.006,"Tests\\Feature\\Models\\Concerns\\StartsTest::testModelReturnsNotStartedWhenStartedAtIsNull":0.006,"Tests\\Feature\\Models\\Concerns\\StartsTest::testModelReturnsNotStartedWhenStartedAtIsOnTheFuture":0.005,"Tests\\Feature\\Models\\SuppressingScopeTest::testSuppressedModelsAreNotReturnedByDefault":0.017,"Tests\\Feature\\Models\\SuppressingScopeTest::testOnlySuppressedModelsAreReturnedWhenCallingMethodOnlyNotSuppressed":0.01,"Tests\\Feature\\Models\\SuppressingScopeTest::testSuppressedModelsAreReturnedWhenCallingMethodWithNotSuppressedAndPassingAFalse":0.013,"Tests\\Feature\\Models\\SuppressingScopeTest::testSuppressedModelsAreNotReturnedWhenCallingWithoutNotSuppressed":0.012,"Tests\\Feature\\Models\\SuppressingScopeTest::testSuppressedModelsAreReturnedWhenCallingMethodWithNotSuppressed":0.008,"Tests\\Feature\\Models\\Concerns\\ExpiresAndHasGraceDaysTest::testModelReturnsIfItHasExpired":0.006,"Tests\\Feature\\Models\\Concerns\\ExpiresAndHasGraceDaysTest::testModelReturnsExpiredStatus":0.006,"Tests\\Feature\\Models\\Concerns\\ExpiresAndHasGraceDaysTest::testModelReturnsIfItHasNotExpired":0.006,"Tests\\Feature\\Models\\Concerns\\ExpiresAndHasGraceDaysTest::testModelReturnsNotExpiredStatus":0.006,"Tests\\Feature\\Models\\Concerns\\ExpiresAndHasGraceDaysTest::testTraitAppliesScope":0.009}} \ No newline at end of file diff --git a/composer.json b/composer.json index a700bfb..7635e69 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ }, "autoload-dev": { "psr-4": { - "LucasDotVin\\Soulbscription\\Tests\\": "tests" + "Tests\\": "tests" } }, "scripts": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index d395899..37d977c 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,39 +1,21 @@ - - - - tests - - - - - ./src - - - - - - - - - - + + + + tests + + + + + ./src + + + + + + + + + + diff --git a/tests/Mocks/Database/Factories/UserFactory.php b/tests/Mocks/Database/Factories/UserFactory.php index a4b5e71..904a2b3 100644 --- a/tests/Mocks/Database/Factories/UserFactory.php +++ b/tests/Mocks/Database/Factories/UserFactory.php @@ -1,8 +1,8 @@