mirror of
https://github.com/Codappix/search_core.git
synced 2024-11-25 13:56:11 +01:00
TASK: Make tests compatible with TYPO3 CMS 7.6
As there is no doctrine, we receive values as string, also for uid.
This commit is contained in:
parent
56bfc4f75a
commit
5a0a4931e4
2 changed files with 30 additions and 6 deletions
|
@ -50,7 +50,11 @@ class NonAllowedTablesTest extends AbstractDataHandlerTest
|
||||||
$this->subject->expects($this->exactly(1))
|
$this->subject->expects($this->exactly(1))
|
||||||
->method('update')
|
->method('update')
|
||||||
->with('pages', $this->callback(function (array $record) {
|
->with('pages', $this->callback(function (array $record) {
|
||||||
|
if ($this->isLegacyVersion()) {
|
||||||
|
return isset($record['uid']) && $record['uid'] === '1';
|
||||||
|
} else {
|
||||||
return isset($record['uid']) && $record['uid'] === 1;
|
return isset($record['uid']) && $record['uid'] === 1;
|
||||||
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
$tce = GeneralUtility::makeInstance(Typo3DataHandler::class);
|
$tce = GeneralUtility::makeInstance(Typo3DataHandler::class);
|
||||||
|
@ -73,7 +77,11 @@ class NonAllowedTablesTest extends AbstractDataHandlerTest
|
||||||
$this->subject->expects($this->exactly(1))
|
$this->subject->expects($this->exactly(1))
|
||||||
->method('update')
|
->method('update')
|
||||||
->with('pages', $this->callback(function (array $record) {
|
->with('pages', $this->callback(function (array $record) {
|
||||||
|
if ($this->isLegacyVersion()) {
|
||||||
|
return isset($record['uid']) && $record['uid'] === '1';
|
||||||
|
} else {
|
||||||
return isset($record['uid']) && $record['uid'] === 1;
|
return isset($record['uid']) && $record['uid'] === 1;
|
||||||
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
$tce = GeneralUtility::makeInstance(Typo3DataHandler::class);
|
$tce = GeneralUtility::makeInstance(Typo3DataHandler::class);
|
||||||
|
@ -96,7 +104,11 @@ class NonAllowedTablesTest extends AbstractDataHandlerTest
|
||||||
$this->subject->expects($this->exactly(1))
|
$this->subject->expects($this->exactly(1))
|
||||||
->method('update')
|
->method('update')
|
||||||
->with('pages', $this->callback(function (array $record) {
|
->with('pages', $this->callback(function (array $record) {
|
||||||
|
if ($this->isLegacyVersion()) {
|
||||||
|
return isset($record['uid']) && $record['uid'] === '1';
|
||||||
|
} else {
|
||||||
return isset($record['uid']) && $record['uid'] === 1;
|
return isset($record['uid']) && $record['uid'] === 1;
|
||||||
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
$tce = GeneralUtility::makeInstance(Typo3DataHandler::class);
|
$tce = GeneralUtility::makeInstance(Typo3DataHandler::class);
|
||||||
|
|
|
@ -53,7 +53,11 @@ class ProcessesAllowedTablesTest extends AbstractDataHandlerTest
|
||||||
$this->subject->expects($this->exactly(1))
|
$this->subject->expects($this->exactly(1))
|
||||||
->method('update')
|
->method('update')
|
||||||
->with('pages', $this->callback(function (array $record) {
|
->with('pages', $this->callback(function (array $record) {
|
||||||
|
if ($this->isLegacyVersion()) {
|
||||||
|
return isset($record['uid']) && $record['uid'] === '1';
|
||||||
|
} else {
|
||||||
return isset($record['uid']) && $record['uid'] === 1;
|
return isset($record['uid']) && $record['uid'] === 1;
|
||||||
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
$tce = GeneralUtility::makeInstance(Typo3DataHandler::class);
|
$tce = GeneralUtility::makeInstance(Typo3DataHandler::class);
|
||||||
|
@ -94,7 +98,11 @@ class ProcessesAllowedTablesTest extends AbstractDataHandlerTest
|
||||||
[
|
[
|
||||||
$this->equalTo('pages'),
|
$this->equalTo('pages'),
|
||||||
$this->callback(function ($record) {
|
$this->callback(function ($record) {
|
||||||
|
if ($this->isLegacyVersion()) {
|
||||||
|
return isset($record['uid']) && $record['uid'] === '1';
|
||||||
|
} else {
|
||||||
return isset($record['uid']) && $record['uid'] === 1;
|
return isset($record['uid']) && $record['uid'] === 1;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
@ -137,7 +145,11 @@ class ProcessesAllowedTablesTest extends AbstractDataHandlerTest
|
||||||
[
|
[
|
||||||
$this->equalTo('pages'),
|
$this->equalTo('pages'),
|
||||||
$this->callback(function ($record) {
|
$this->callback(function ($record) {
|
||||||
|
if ($this->isLegacyVersion()) {
|
||||||
|
return isset($record['uid']) && $record['uid'] === '1';
|
||||||
|
} else {
|
||||||
return isset($record['uid']) && $record['uid'] === 1;
|
return isset($record['uid']) && $record['uid'] === 1;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue