Merge pull request #154 from Codappix/feature/fix-travis

Feature: Fix travis
This commit is contained in:
Daniel Siepmann 2018-04-12 11:57:09 +02:00 committed by GitHub
commit 1644fd3c4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 7 deletions

View file

@ -5,7 +5,7 @@ addons:
packages: packages:
- oracle-java8-set-default - oracle-java8-set-default
before_install: 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;' - mysql -u root -e 'GRANT ALL ON `typo3_ci_ft%`.* TO travis@127.0.0.1;'
language: php language: php

View file

@ -39,14 +39,9 @@ abstract class AbstractUnitTestCase extends CoreTestCase
$this->singletonInstances = GeneralUtility::getSingletonInstances(); $this->singletonInstances = GeneralUtility::getSingletonInstances();
// Disable caching backends to make TYPO3 parts work in unit test mode. // Disable caching backends to make TYPO3 parts work in unit test mode.
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Core\Cache\CacheManager::class \TYPO3\CMS\Core\Cache\CacheManager::class
)->setCacheConfigurations([ )->setCacheConfigurations($this->getCacheConfiguration());
'extbase_object' => [
'backend' => \TYPO3\CMS\Core\Cache\Backend\NullBackend::class,
],
]);
} }
public function tearDown() public function tearDown()
@ -100,4 +95,25 @@ abstract class AbstractUnitTestCase extends CoreTestCase
{ {
return \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) < 8000000; 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;
}
} }