mirror of
https://github.com/Codappix/search_core.git
synced 2024-11-26 03:36:10 +01:00
Do not introduce typo3 db legacy dependency
Instead return expected object type.
This commit is contained in:
parent
5779cb911d
commit
274844dbba
1 changed files with 5 additions and 5 deletions
|
@ -25,7 +25,7 @@ use Codappix\SearchCore\Domain\Index\TcaIndexer\RelationResolver;
|
||||||
use Codappix\SearchCore\Domain\Index\TcaIndexer\TcaTableService76;
|
use Codappix\SearchCore\Domain\Index\TcaIndexer\TcaTableService76;
|
||||||
use Codappix\SearchCore\Domain\Index\TcaIndexer\TcaTableService;
|
use Codappix\SearchCore\Domain\Index\TcaIndexer\TcaTableService;
|
||||||
use Codappix\SearchCore\Tests\Unit\AbstractUnitTestCase;
|
use Codappix\SearchCore\Tests\Unit\AbstractUnitTestCase;
|
||||||
use TYPO3\CMS\Typo3DbLegacy\Database\DatabaseConnection;
|
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||||
|
|
||||||
class TcaTableServiceTest extends AbstractUnitTestCase
|
class TcaTableServiceTest extends AbstractUnitTestCase
|
||||||
{
|
{
|
||||||
|
@ -40,16 +40,16 @@ class TcaTableServiceTest extends AbstractUnitTestCase
|
||||||
protected $configuration;
|
protected $configuration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var DatabaseConnection
|
* @var ConnectionPool
|
||||||
*/
|
*/
|
||||||
protected $databaseConnection;
|
protected $connectionPool;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->configuration = $this->getMockBuilder(ConfigurationContainerInterface::class)->getMock();
|
$this->configuration = $this->getMockBuilder(ConfigurationContainerInterface::class)->getMock();
|
||||||
$this->databaseConnection = $this->getMockBuilder(DatabaseConnection::class)->getMock();
|
$this->connectionPool = $this->getMockBuilder(ConnectionPool::class)->getMock();
|
||||||
|
|
||||||
$className = TcaTableService::class;
|
$className = TcaTableService::class;
|
||||||
if ($this->isLegacyVersion()) {
|
if ($this->isLegacyVersion()) {
|
||||||
|
@ -61,7 +61,7 @@ class TcaTableServiceTest extends AbstractUnitTestCase
|
||||||
->getMock();
|
->getMock();
|
||||||
$this->subject->expects($this->any())
|
$this->subject->expects($this->any())
|
||||||
->method('getConnection')
|
->method('getConnection')
|
||||||
->willReturn($this->databaseConnection);
|
->willReturn($this->connectionPool);
|
||||||
|
|
||||||
$this->inject($this->subject, 'configuration', $this->configuration);
|
$this->inject($this->subject, 'configuration', $this->configuration);
|
||||||
$this->inject($this->subject, 'logger', $this->getMockedLogger());
|
$this->inject($this->subject, 'logger', $this->getMockedLogger());
|
||||||
|
|
Loading…
Reference in a new issue