added avatars, show user teams in list, new team dashboard widgets (#1150)

This commit is contained in:
Kevin Papst
2019-10-03 13:44:16 +02:00
committed by GitHub
parent 718ad4b398
commit e8c25d8ac5
120 changed files with 2585 additions and 642 deletions

View File

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