Skip to content

Instantly share code, notes, and snippets.

@wazum
Created October 13, 2019 17:29
Show Gist options
  • Save wazum/5773603385df2bdc31f96679a4d096e2 to your computer and use it in GitHub Desktop.
Save wazum/5773603385df2bdc31f96679a4d096e2 to your computer and use it in GitHub Desktop.
<?php
declare(strict_types=1);
namespace Vendor\MyExtenstion\Test\Functional\Service;
use …
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
class ConcreteSomethingImportServiceTest extends FunctionalTestCase
{
/**
* @var string[]
*/
protected $testExtensionsToLoad = [
'typo3conf/ext/my_extension'
];
/**
* @test
*/
public function importDoesItRight(): void
{
// do something here …
$this->assertCSVDataSet('EXT:my_extension/Test/Functional/Fixtures/DatabaseAssertions/importSomething.csv');
}
protected function setUp(): void
{
parent::setUp();
// Core DataHandler requires a backend user
$this->setUpBackendUserFromFixture(1);
$this->importDataSet('EXT:my_extension/Test/Functional/Fixtures/defaultPages.xml');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment