Timesheet validator: prevent overbooking budgets (#2422)

This commit is contained in:
Kevin Papst
2021-03-13 14:41:29 +01:00
committed by GitHub
parent db1344573f
commit 3e9371bd6a
34 changed files with 1425 additions and 236 deletions

View File

@@ -9,7 +9,6 @@
namespace App\Tests\Model;
use App\Entity\Project;
use App\Model\ProjectStatistic;
use PHPUnit\Framework\TestCase;
@@ -20,7 +19,7 @@ class ProjectStatisticTest extends TestCase
{
public function testDefaultValues()
{
$sut = new ProjectStatistic(new Project());
$sut = new ProjectStatistic();
self::assertEquals(0, $sut->getActivityAmount());
self::assertEquals(0, $sut->getRecordAmount());
self::assertEquals(0, $sut->getRecordDuration());
@@ -28,8 +27,7 @@ class ProjectStatisticTest extends TestCase
public function testSetter()
{
$project = new Project();
$sut = new ProjectStatistic($project);
$sut = new ProjectStatistic();
$sut->setRecordAmount(7654);
$sut->setRecordDuration(826);
$sut->setActivityAmount(13);
@@ -37,6 +35,5 @@ class ProjectStatisticTest extends TestCase
self::assertEquals(13, $sut->getActivityAmount());
self::assertEquals(7654, $sut->getRecordAmount());
self::assertEquals(826, $sut->getRecordDuration());
self::assertSame($project, $sut->getProject());
}
}