Skip to content

Commit

Permalink
[Tests] Moved IbexaSolrTestKernel to src/contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
ciastektk committed Nov 9, 2023
1 parent 4f3ec53 commit c80530b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"Ibexa\\Bundle\\Solr\\": "src/bundle/",
"Ibexa\\Contracts\\Solr\\": "src/contracts/",
"Ibexa\\Tests\\Solr\\SetupFactory\\": "tests/lib/SetupFactory/",
"Ibexa\\Tests\\Integration\\Solr\\": "tests/integration/",
"EzSystems\\EzPlatformSolrSearchEngine\\": "src/lib/",
"EzSystems\\EzPlatformSolrSearchEngineBundle\\": "src/bundle/",
"EzSystems\\EzPlatformSolrSearchEngine\\Tests\\SetupFactory\\": "tests/lib/SetupFactory/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,22 @@
*/
declare(strict_types=1);

namespace Ibexa\Tests\Integration\Solr;
namespace Ibexa\Contracts\Solr\Test;

use Ibexa\Bundle\Solr\IbexaSolrBundle;
use Ibexa\Contracts\Core\Search\Handler;
use Ibexa\Contracts\Core\Test\IbexaTestKernel as BaseIbexaTestKernel;
use Ibexa\Solr\Handler as SolrHandler;
use Ibexa\Solr\Test\SolrTestContainerBuilder;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;

final class IbexaTestKernel extends BaseIbexaTestKernel
/**
* @internal
*
* Exposed in contracts to be able to run tests from ibexa/core.
*/
final class IbexaSolrTestKernel extends BaseIbexaTestKernel
{
public function registerBundles(): iterable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
declare(strict_types=1);

namespace Ibexa\Tests\Integration\Solr;
namespace Ibexa\Solr\Test;

use Ibexa\Tests\Integration\Core\Repository\SearchServiceTranslationLanguageFallbackTest;
use RuntimeException;
Expand All @@ -31,8 +31,8 @@ public function loadSolrSettings(ContainerBuilder $containerBuilder): void
{
$containerBuilder->setParameter('test.ibexa.solr.host', getenv('SOLR_HOST') ?: 'localhost');

$settingsPath = dirname(__DIR__, 2) . '/src/lib/Resources/config/container/';
$testSettingsPath = dirname(__DIR__) . '/lib/Resources/config/';
$settingsPath = dirname(__DIR__) . '/Resources/config/container/';
$testSettingsPath = dirname(__DIR__, 3) . '/tests/lib/Resources/config/';

$solrLoader = new YamlFileLoader($containerBuilder, new FileLocator($settingsPath));
$solrLoader->load('solr.yml');
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/SetupFactory/LegacySetupFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use Ibexa\Solr\Container\Compiler;
use Ibexa\Solr\Gateway\UpdateSerializerInterface;
use Ibexa\Solr\Handler as SolrSearchHandler;
use Ibexa\Tests\Integration\Solr\SolrTestContainerBuilder;
use Ibexa\Solr\Test\SolrTestContainerBuilder;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\HttpClient\HttpClient;
Expand Down

0 comments on commit c80530b

Please sign in to comment.