Added timesheet-calendar view (#236)

This commit is contained in:
Kevin Papst
2018-07-27 20:19:56 +02:00
committed by GitHub
parent 5ccc1c991b
commit e6f8bc8ae2
40 changed files with 1286 additions and 49 deletions

View File

@@ -0,0 +1,38 @@
<?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\Calendar;
use App\Calendar\Google;
use App\Calendar\Source;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \App\Calendar\Google
*/
class GoogleTest extends TestCase
{
public function testConstruct()
{
$sources = [
(new Source())->setId('foo')->setColor('#ccc'),
(new Source())->setId('bar')->setUri('sdsdfsdfsdfsdffd'),
];
$sut = new Google('qwertzuiop1234567890');
$this->assertEquals([], $sut->getSources());
$this->assertEquals('qwertzuiop1234567890', $sut->getApiKey());
$sut = new Google('ewa6347865fg908ouhpoihui7f56', $sources);
$this->assertEquals($sources, $sut->getSources());
$this->assertEquals('ewa6347865fg908ouhpoihui7f56', $sut->getApiKey());
}
}