Release 2.33.0 (#5438)
This commit is contained in:
@@ -11,6 +11,7 @@ namespace App\Tests\Export\Package;
|
||||
|
||||
use App\Entity\ExportableItem;
|
||||
use App\Export\Package\CellFormatter\CellFormatterInterface;
|
||||
use App\Export\Package\CellFormatter\DateFormatter;
|
||||
use App\Export\Package\Column;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
@@ -85,4 +86,17 @@ class ColumnTest extends TestCase
|
||||
$column = new Column('testName', $formatter);
|
||||
self::assertEquals('testName', $column->getHeader());
|
||||
}
|
||||
|
||||
public function testWithFormatReturnsNull(): void
|
||||
{
|
||||
$formatter = $this->createMock(CellFormatterInterface::class);
|
||||
$column = new Column('testName', $formatter);
|
||||
self::assertNull($column->getFormat());
|
||||
}
|
||||
|
||||
public function testWithFormatReturnsValueFromFormatter(): void
|
||||
{
|
||||
$column = new Column('testName', new DateFormatter());
|
||||
self::assertEquals('yyyy-mm-dd', $column->getFormat());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user