mirror of
https://github.com/Codappix/search_core.git
synced 2024-11-25 22:56:16 +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\TcaTableService;
|
||||
use Codappix\SearchCore\Tests\Unit\AbstractUnitTestCase;
|
||||
use TYPO3\CMS\Typo3DbLegacy\Database\DatabaseConnection;
|
||||
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||
|
||||
class TcaTableServiceTest extends AbstractUnitTestCase
|
||||
{
|
||||
|
@ -40,16 +40,16 @@ class TcaTableServiceTest extends AbstractUnitTestCase
|
|||
protected $configuration;
|
||||
|
||||
/**
|
||||
* @var DatabaseConnection
|
||||
* @var ConnectionPool
|
||||
*/
|
||||
protected $databaseConnection;
|
||||
protected $connectionPool;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->configuration = $this->getMockBuilder(ConfigurationContainerInterface::class)->getMock();
|
||||
$this->databaseConnection = $this->getMockBuilder(DatabaseConnection::class)->getMock();
|
||||
$this->connectionPool = $this->getMockBuilder(ConnectionPool::class)->getMock();
|
||||
|
||||
$className = TcaTableService::class;
|
||||
if ($this->isLegacyVersion()) {
|
||||
|
@ -61,7 +61,7 @@ class TcaTableServiceTest extends AbstractUnitTestCase
|
|||
->getMock();
|
||||
$this->subject->expects($this->any())
|
||||
->method('getConnection')
|
||||
->willReturn($this->databaseConnection);
|
||||
->willReturn($this->connectionPool);
|
||||
|
||||
$this->inject($this->subject, 'configuration', $this->configuration);
|
||||
$this->inject($this->subject, 'logger', $this->getMockedLogger());
|
||||
|
|
Loading…
Reference in a new issue