2016-12-09 19:45:46 +01:00
|
|
|
<?php
|
2017-07-06 23:48:47 +02:00
|
|
|
namespace Codappix\SearchCore\Tests\Functional;
|
2016-12-09 19:45:46 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (C) 2016 Daniel Siepmann <coding@daniel-siepmann.de>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
|
|
* 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
use TYPO3\CMS\Core\Tests\FunctionalTestCase as CoreTestCase;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* All functional tests should extend this base class.
|
|
|
|
*/
|
2016-12-12 18:02:52 +01:00
|
|
|
abstract class AbstractFunctionalTestCase extends CoreTestCase
|
2016-12-09 19:45:46 +01:00
|
|
|
{
|
|
|
|
protected $testExtensionsToLoad = ['typo3conf/ext/search_core'];
|
|
|
|
|
|
|
|
public function setUp()
|
|
|
|
{
|
|
|
|
parent::setUp();
|
|
|
|
|
2016-12-13 17:10:23 +01:00
|
|
|
$this->setUpBackendUserFromFixture(1);
|
2016-12-13 16:55:57 +01:00
|
|
|
\TYPO3\CMS\Core\Core\Bootstrap::getInstance()->initializeLanguageObject();
|
|
|
|
|
2016-12-15 14:28:40 +01:00
|
|
|
foreach ($this->getDataSets() as $dataSet) {
|
|
|
|
$this->importDataSet($dataSet);
|
|
|
|
}
|
2016-12-10 14:41:48 +01:00
|
|
|
|
2016-12-15 14:02:40 +01:00
|
|
|
$this->setUpFrontendRootPage(1, $this->getTypoScriptFilesForFrontendRootPage());
|
2018-03-13 17:28:50 +01:00
|
|
|
|
|
|
|
// \Codappix\SearchCore\Compatibility\ImplementationRegistrationService::registerImplementations();
|
2016-12-09 19:45:46 +01:00
|
|
|
}
|
|
|
|
|
2016-12-15 14:28:40 +01:00
|
|
|
/**
|
|
|
|
* Overwrite to import different files.
|
|
|
|
*
|
|
|
|
* Defines which DataSet Files should be imported.
|
|
|
|
*
|
|
|
|
* @return array<String>
|
|
|
|
*/
|
|
|
|
protected function getDataSets()
|
|
|
|
{
|
|
|
|
return ['Tests/Functional/Fixtures/BasicSetup.xml'];
|
|
|
|
}
|
|
|
|
|
2016-12-15 14:02:40 +01:00
|
|
|
/**
|
|
|
|
* Overwrite to import different files.
|
|
|
|
*
|
|
|
|
* Defines which TypoScript Files should be imported.
|
|
|
|
*
|
|
|
|
* @return array<String>
|
|
|
|
*/
|
|
|
|
protected function getTypoScriptFilesForFrontendRootPage()
|
2016-12-09 19:45:46 +01:00
|
|
|
{
|
2016-12-15 11:31:48 +01:00
|
|
|
return ['EXT:search_core/Tests/Functional/Fixtures/BasicSetup.ts'];
|
2016-12-09 19:45:46 +01:00
|
|
|
}
|
2018-03-13 12:18:00 +01:00
|
|
|
|
2018-03-13 17:28:50 +01:00
|
|
|
protected function isLegacyVersion() : bool
|
2018-03-13 12:18:00 +01:00
|
|
|
{
|
|
|
|
return \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) < 8000000;
|
|
|
|
}
|
2016-12-09 19:45:46 +01:00
|
|
|
}
|