added export context (#2216)

This commit is contained in:
Kevin Papst
2020-12-22 18:41:00 +01:00
committed by GitHub
parent 74b3917e69
commit 40eda01c22
16 changed files with 266 additions and 64 deletions

View File

@@ -0,0 +1,37 @@
<?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\Export;
use App\Export\ExportContext;
use PHPUnit\Framework\TestCase;
/**
* @covers \App\Export\ExportContext
*/
class ExportContextTest extends TestCase
{
public function testEmptyObject()
{
$sut = new ExportContext();
self::assertIsArray($sut->getOptions());
self::assertEmpty($sut->getOptions());
self::assertNull($sut->getOption('unknown'));
}
public function testSetterAndGetter()
{
$sut = new ExportContext();
self::assertNull($sut->getOption('unknown'));
$sut->setOption('unknown', 'foo');
self::assertEquals('foo', $sut->getOption('unknown'));
}
}