0
0
Fork 0
mirror of https://github.com/kevinpapst/kimai2.git synced 2025-05-10 11:50:46 +00:00
kevinpapst_kimai2/tests/Calendar/GoogleTest.php

39 lines
972 B
PHP
Raw Normal View History

2018-07-27 20:19:56 +02:00
<?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\GoogleSource;
2018-07-27 20:19:56 +02:00
use PHPUnit\Framework\TestCase;
/**
2019-05-19 17:05:07 +02:00
* @covers \App\Calendar\Google
2018-07-27 20:19:56 +02:00
*/
class GoogleTest extends TestCase
{
2024-02-07 23:47:25 +01:00
public function testConstruct(): void
2018-07-27 20:19:56 +02:00
{
$sources = [
new GoogleSource('foo', '', '#ccc'),
new GoogleSource('bar', 'sdsdfsdfsdfsdffd'),
2018-07-27 20:19:56 +02:00
];
$sut = new Google('qwertzuiop1234567890');
2024-12-22 01:25:30 +01:00
self::assertEquals([], $sut->getSources());
self::assertEquals('qwertzuiop1234567890', $sut->getApiKey());
2018-07-27 20:19:56 +02:00
$sut = new Google('ewa6347865fg908ouhpoihui7f56', $sources);
2024-12-22 01:25:30 +01:00
self::assertEquals($sources, $sut->getSources());
self::assertEquals('ewa6347865fg908ouhpoihui7f56', $sut->getApiKey());
2018-07-27 20:19:56 +02:00
}
}