use events for budget calculation (#2544)
This commit is contained in:
36
tests/Event/ProjectStatisticEventTest.php
Normal file
36
tests/Event/ProjectStatisticEventTest.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\Event;
|
||||
|
||||
use App\Entity\Project;
|
||||
use App\Event\AbstractProjectEvent;
|
||||
use App\Event\ProjectStatisticEvent;
|
||||
use App\Model\ProjectStatistic;
|
||||
|
||||
/**
|
||||
* @covers \App\Event\AbstractProjectEvent
|
||||
* @covers \App\Event\ProjectStatisticEvent
|
||||
*/
|
||||
class ProjectStatisticEventTest extends AbstractProjectEventTest
|
||||
{
|
||||
protected function createProjectEvent(Project $project): AbstractProjectEvent
|
||||
{
|
||||
return new ProjectStatisticEvent($project, new ProjectStatistic());
|
||||
}
|
||||
|
||||
public function testStatistic()
|
||||
{
|
||||
$project = new Project();
|
||||
$statistic = new ProjectStatistic();
|
||||
$sut = new ProjectStatisticEvent($project, $statistic);
|
||||
|
||||
self::assertSame($statistic, $sut->getStatistic());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user