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

@@ -13,6 +13,7 @@ use App\Entity\User;
use App\Repository\TimesheetRepository;
use App\Repository\WidgetRepository;
use App\Tests\Mocks\Security\CurrentUserFactory;
use App\Widget\Type\CompoundChart;
use PHPUnit\Framework\TestCase;
/**
@@ -46,7 +47,7 @@ class WidgetRepositoryTest extends TestCase
/**
* @expectedException \App\Widget\WidgetException
* @expectedExceptionMessage Unknown widget type "\App\Widget\Type\FooBar"
* @expectedExceptionMessage Unknown widget type "FooBar"
*/
public function testGetWidgetThrowsExceptionOnInvalidType()
{
@@ -59,14 +60,14 @@ class WidgetRepositoryTest extends TestCase
/**
* @expectedException \App\Widget\WidgetException
* @expectedExceptionMessage Invalid widget type "\App\Widget\Type\CompoundChart" does not extend AbstractWidgetType
* @expectedExceptionMessage Widget type "App\Widget\Type\CompoundChart" is not an instance of "App\Widget\Type\AbstractWidgetType"
*/
public function testGetWidgetTriggersExceptionOnWrongClass()
{
$repoMock = $this->getMockBuilder(TimesheetRepository::class)->disableOriginalConstructor()->getMock();
$userMock = (new CurrentUserFactory($this))->create(new User());
$sut = new WidgetRepository($repoMock, $userMock, ['test' => ['type' => 'CompoundChart', 'user' => false]]);
$sut = new WidgetRepository($repoMock, $userMock, ['test' => ['type' => CompoundChart::class, 'user' => false]]);
$sut->get('test');
}