Added time estimates for projects and tasks, fixes ST-283

This commit is contained in:
Constantin Graf
2024-07-02 16:36:15 +02:00
committed by Gregor Vostrak
parent 78ea8a673b
commit a820d8540f
18 changed files with 402 additions and 6 deletions

View File

@@ -72,11 +72,21 @@ abstract class TestCase extends BaseTestCase
protected function assertBillableRateServiceIsUnused(): void
{
$this->mock(BillableRateService::class, function (MockInterface $mock) {
$this->mock(BillableRateService::class, function (MockInterface $mock): void {
$mock->shouldNotReceive('updateTimeEntriesBillableRateForProjectMember');
$mock->shouldNotReceive('updateTimeEntriesBillableRateForProject');
$mock->shouldNotReceive('updateTimeEntriesBillableRateForMember');
$mock->shouldNotReceive('updateTimeEntriesBillableRateForOrganization');
});
}
protected function actAsOrganizationWithSubscription(): void
{
$this->mock(BillingContract::class, function (MockInterface $mock): void {
$mock->shouldReceive('hasSubscription')->andReturn(true);
$mock->shouldReceive('hasTrial')->andReturn(false);
$mock->shouldReceive('getTrialUntil')->andReturn(null);
$mock->shouldReceive('isBlocked')->andReturn(false);
});
}
}