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

@@ -30,6 +30,16 @@ class BaseQueryTest extends TestCase
$this->assertResetByFormError(new BaseQuery());
}
/**
* @expectedDeprecation BaseQuery::getResultType() is deprecated and will be removed with 1.6
* @group legacy
*/
public function testDeprecations()
{
$sut = new BaseQuery();
$sut->getResultType();
}
protected function assertResetByFormError(BaseQuery $sut, $orderBy = 'id', $order = 'ASC')
{
$sut->setOrder('ASK');
@@ -49,7 +59,6 @@ class BaseQueryTest extends TestCase
protected function assertBaseQuery(BaseQuery $sut, $orderBy = 'id')
{
$this->assertResultType($sut);
$this->assertPage($sut);
$this->assertPageSize($sut);
$this->assertOrderBy($sut, $orderBy);
@@ -85,24 +94,6 @@ class BaseQueryTest extends TestCase
$sut->resetByFormError($formErrors);
}
protected function assertResultType(BaseQuery $sut)
{
self::assertEquals(BaseQuery::RESULT_TYPE_PAGER, $sut->getResultType());
$sut->setResultType(BaseQuery::RESULT_TYPE_QUERYBUILDER);
self::assertEquals(BaseQuery::RESULT_TYPE_QUERYBUILDER, $sut->getResultType());
$sut->setResultType(BaseQuery::RESULT_TYPE_OBJECTS);
self::assertEquals(BaseQuery::RESULT_TYPE_OBJECTS, $sut->getResultType());
try {
$sut->setResultType('foo-bar');
} catch (\Exception $exception) {
$this->assertInstanceOf(\InvalidArgumentException::class, $exception);
self::assertEquals('Unsupported query result type', $exception->getMessage());
}
}
protected function assertTeams(BaseQuery $sut)
{
self::assertEmpty($sut->getTeams());

View File

@@ -24,7 +24,6 @@ class ExportQueryTest extends BaseQueryTest
{
$sut = new ExportQuery();
$this->assertResultType($sut);
$this->assertPage($sut);
$this->assertPageSize($sut);
$this->assertOrderBy($sut, 'begin');

View File

@@ -24,7 +24,6 @@ class InvoiceQueryTest extends BaseQueryTest
{
$sut = new InvoiceQuery();
$this->assertResultType($sut);
$this->assertPage($sut);
$this->assertPageSize($sut);
$this->assertOrderBy($sut, 'begin');

View File

@@ -25,7 +25,6 @@ class TimesheetQueryTest extends BaseQueryTest
{
$sut = new TimesheetQuery();
$this->assertResultType($sut);
$this->assertPage($sut);
$this->assertPageSize($sut);
$this->assertOrderBy($sut, 'begin');