-
-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ExcelOpenSpoutExporter: test case for exporter collection
- Loading branch information
Showing
3 changed files
with
61 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
/* | ||
* Symfony DataTables Bundle | ||
* (c) Omines Internetbureau B.V. - https://omines.nl/ | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Tests\Unit\Exporter; | ||
|
||
use Omines\DataTablesBundle\Exporter\DataTableExporterCollection; | ||
use Omines\DataTablesBundle\Exporter\Excel\ExcelOpenSpoutExporter; | ||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; | ||
|
||
class ExcelOpenSpoutExporterTest extends KernelTestCase | ||
{ | ||
/** @var DataTableExporterCollection */ | ||
private $exporterCollection; | ||
|
||
protected function setUp(): void | ||
{ | ||
$this->bootKernel(); | ||
|
||
$this->exporterCollection = $this->getContainer()->get(DataTableExporterCollection::class); | ||
} | ||
|
||
public function testTag(): void | ||
{ | ||
$this->assertInstanceOf(ExcelOpenSpoutExporter::class, $this->exporterCollection->getByName('excel-openspout')); | ||
} | ||
|
||
public function testName(): void | ||
{ | ||
$this->assertSame('excel-openspout', $this->exporterCollection->getByName('excel-openspout')->getName()); | ||
} | ||
} |