mirror of
https://github.com/Codappix/search_core.git
synced 2024-11-22 11:16:11 +01:00
WIP|TASK: Use new TYPO3
Use testing framework configuration. Use new db. Begin with replacement of old TYPO3_DB.
This commit is contained in:
parent
9769ee1cb6
commit
9d20524706
3 changed files with 14 additions and 6 deletions
|
@ -112,7 +112,7 @@ class TcaIndexer implements IndexerInterface
|
||||||
*/
|
*/
|
||||||
protected function getRecords($offset, $limit)
|
protected function getRecords($offset, $limit)
|
||||||
{
|
{
|
||||||
$records = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
|
$records = $this->getDatabaseConnection()->exec_SELECTgetRows(
|
||||||
$this->tcaTableService->getFields(),
|
$this->tcaTableService->getFields(),
|
||||||
$this->tcaTableService->getTableClause(),
|
$this->tcaTableService->getTableClause(),
|
||||||
$this->tcaTableService->getWhereClause(),
|
$this->tcaTableService->getWhereClause(),
|
||||||
|
@ -139,7 +139,7 @@ class TcaIndexer implements IndexerInterface
|
||||||
*/
|
*/
|
||||||
protected function getRecord($identifier)
|
protected function getRecord($identifier)
|
||||||
{
|
{
|
||||||
$record = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow(
|
$record = $this->getDatabaseConnection()->exec_SELECTgetSingleRow(
|
||||||
$this->tcaTableService->getFields(),
|
$this->tcaTableService->getFields(),
|
||||||
$this->tcaTableService->getTableClause(),
|
$this->tcaTableService->getTableClause(),
|
||||||
$this->tcaTableService->getWhereClause()
|
$this->tcaTableService->getWhereClause()
|
||||||
|
@ -156,4 +156,10 @@ class TcaIndexer implements IndexerInterface
|
||||||
|
|
||||||
return $record;
|
return $record;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getDatabaseConnection()
|
||||||
|
{
|
||||||
|
return GeneralUtility::makeInstance(ConnectionPool::class)
|
||||||
|
->getConnectionByName('Default');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
8
Makefile
8
Makefile
|
@ -1,10 +1,11 @@
|
||||||
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
|
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
|
||||||
current_dir := $(dir $(mkfile_path))
|
current_dir := $(dir $(mkfile_path))
|
||||||
|
|
||||||
TYPO3_WEB_DIR := $(current_dir).Build/Web
|
TYPO3_WEB_DIR := $(current_dir).Build/web
|
||||||
|
TYPO3_PATH_ROOT := $(current_dir).Build/web
|
||||||
# Allow different versions on travis
|
# Allow different versions on travis
|
||||||
TYPO3_VERSION ?= ~7.6
|
TYPO3_VERSION ?= ~8.2
|
||||||
typo3DatabaseName ?= "searchcore_test"
|
typo3DatabaseName ?= "searchcore_test2"
|
||||||
typo3DatabaseUsername ?= "dev"
|
typo3DatabaseUsername ?= "dev"
|
||||||
typo3DatabasePassword ?= "dev"
|
typo3DatabasePassword ?= "dev"
|
||||||
typo3DatabaseHost ?= "127.0.0.1"
|
typo3DatabaseHost ?= "127.0.0.1"
|
||||||
|
@ -21,6 +22,7 @@ functionalTests:
|
||||||
typo3DatabaseHost=$(typo3DatabaseHost) \
|
typo3DatabaseHost=$(typo3DatabaseHost) \
|
||||||
TYPO3_PATH_WEB=$(TYPO3_WEB_DIR) \
|
TYPO3_PATH_WEB=$(TYPO3_WEB_DIR) \
|
||||||
.Build/bin/phpunit --colors --debug -v \
|
.Build/bin/phpunit --colors --debug -v \
|
||||||
|
--stop-on-error \
|
||||||
-c Tests/Functional/FunctionalTests.xml
|
-c Tests/Functional/FunctionalTests.xml
|
||||||
|
|
||||||
uploadCodeCoverage: uploadCodeCoverageToScrutinizer uploadCodeCoverageToCodacy
|
uploadCodeCoverage: uploadCodeCoverageToScrutinizer uploadCodeCoverageToCodacy
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<phpunit
|
<phpunit
|
||||||
backupGlobals="true"
|
backupGlobals="true"
|
||||||
backupStaticAttributes="false"
|
backupStaticAttributes="false"
|
||||||
bootstrap="../../.Build/vendor/typo3/cms/typo3/sysext/core/Build/FunctionalTestsBootstrap.php"
|
bootstrap="../../.Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTestsBootstrap.php"
|
||||||
|
|
||||||
colors="true"
|
colors="true"
|
||||||
convertErrorsToExceptions="false"
|
convertErrorsToExceptions="false"
|
||||||
|
|
Loading…
Reference in a new issue