Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
29 additions
and
67 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
use Contributte\Elasticsearch\DI\ElasticsearchExtension; | ||
use Contributte\Tester\Toolkit; | ||
use Contributte\Tester\Utils\ContainerBuilder; | ||
use Contributte\Tester\Utils\Neonkit; | ||
use Elastic\Elasticsearch\Client; | ||
use Nette\DI\Compiler; | ||
use Nette\DI\Container; | ||
use Tester\Assert; | ||
|
||
require_once __DIR__ . '/../../bootstrap.php'; | ||
|
||
Toolkit::test(function (): void { | ||
$container = ContainerBuilder::of() | ||
->withCompiler(function (Compiler $compiler): void { | ||
$compiler->addExtension('elasticsearch', new ElasticsearchExtension()); | ||
$compiler->addConfig(Neonkit::load(<<<'NEON' | ||
elasticsearch: | ||
hosts: [192.168.1.100:9999] | ||
NEON | ||
)); | ||
})->build(); | ||
|
||
Assert::type(Container::class, $container); | ||
Assert::type(Client::class, $container->getService('elasticsearch.client')); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
use Ninjify\Nunjuck\Environment; | ||
use Contributte\Tester\Environment; | ||
|
||
if (@! include __DIR__ . '/../vendor/autoload.php') { | ||
if (@!include __DIR__ . '/../vendor/autoload.php') { | ||
echo 'Install Nette Tester using `composer update --dev`'; | ||
exit(1); | ||
} | ||
|
||
// Configure environment | ||
Environment::setup(__DIR__); |
This file was deleted.
Oops, something went wrong.