Add ability to update billable rate of existing time entries

This commit is contained in:
Constantin Graf
2024-06-14 16:46:39 +02:00
committed by Gregor Vostrak
parent 7c26cee1ea
commit 2184b3c835
22 changed files with 1001 additions and 25 deletions

View File

@@ -4,12 +4,14 @@ declare(strict_types=1);
namespace Tests;
use App\Service\BillableRateService;
use App\Service\PermissionStore;
use Carbon\CarbonImmutable;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Mail;
use Mockery\MockInterface;
use TiMacDonald\Log\LogFake;
abstract class TestCase extends BaseTestCase
@@ -47,4 +49,14 @@ abstract class TestCase extends BaseTestCase
{
parent::travelTo($date->utc());
}
protected function assertBillableRateServiceIsUnused(): void
{
$this->mock(BillableRateService::class, function (MockInterface $mock) {
$mock->shouldNotReceive('updateTimeEntriesBillableRateForProjectMember');
$mock->shouldNotReceive('updateTimeEntriesBillableRateForProject');
$mock->shouldNotReceive('updateTimeEntriesBillableRateForMember');
$mock->shouldNotReceive('updateTimeEntriesBillableRateForOrganization');
});
}
}