mirror of
https://github.com/Codappix/search_core.git
synced 2024-11-22 14:36:11 +01:00
Merge pull request #154 from Codappix/feature/fix-travis
Feature: Fix travis
This commit is contained in:
commit
1644fd3c4e
2 changed files with 23 additions and 7 deletions
|
@ -5,7 +5,7 @@ addons:
|
|||
packages:
|
||||
- oracle-java8-set-default
|
||||
before_install:
|
||||
- curl -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.2.0.deb && sudo dpkg -i --force-confnew elasticsearch-5.2.0.deb && sudo service elasticsearch start
|
||||
- curl -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.2.0.deb && sudo dpkg -i --force-confnew elasticsearch-5.2.0.deb && sudo service elasticsearch restart
|
||||
- mysql -u root -e 'GRANT ALL ON `typo3_ci_ft%`.* TO travis@127.0.0.1;'
|
||||
|
||||
language: php
|
||||
|
|
|
@ -39,14 +39,9 @@ abstract class AbstractUnitTestCase extends CoreTestCase
|
|||
$this->singletonInstances = GeneralUtility::getSingletonInstances();
|
||||
|
||||
// Disable caching backends to make TYPO3 parts work in unit test mode.
|
||||
|
||||
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
|
||||
\TYPO3\CMS\Core\Cache\CacheManager::class
|
||||
)->setCacheConfigurations([
|
||||
'extbase_object' => [
|
||||
'backend' => \TYPO3\CMS\Core\Cache\Backend\NullBackend::class,
|
||||
],
|
||||
]);
|
||||
)->setCacheConfigurations($this->getCacheConfiguration());
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
|
@ -100,4 +95,25 @@ abstract class AbstractUnitTestCase extends CoreTestCase
|
|||
{
|
||||
return \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) < 8000000;
|
||||
}
|
||||
|
||||
protected function getCacheConfiguration() : array
|
||||
{
|
||||
$cacheConfiguration = [
|
||||
'extbase_object' => [
|
||||
'backend' => \TYPO3\CMS\Core\Cache\Backend\NullBackend::class,
|
||||
],
|
||||
'cache_runtime' => [
|
||||
'backend' => \TYPO3\CMS\Core\Cache\Backend\NullBackend::class,
|
||||
],
|
||||
];
|
||||
|
||||
if (class_exists(\TYPO3\CMS\Fluid\Core\Cache\FluidTemplateCache::class)) {
|
||||
$cacheConfiguration['fluid_template'] = [
|
||||
'backend' => \TYPO3\CMS\Core\Cache\Backend\NullBackend::class,
|
||||
'frontend' => \TYPO3\CMS\Fluid\Core\Cache\FluidTemplateCache::class,
|
||||
];
|
||||
}
|
||||
|
||||
return $cacheConfiguration;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue