Skip to content

Commit

Permalink
improvement(namespace): rename namespace and change default creation …
Browse files Browse the repository at this point in the history
…container
  • Loading branch information
mikel00per committed Nov 27, 2023
1 parent 935550f commit 40333f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions tests/MicroserviceSlimTest.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<?php

namespace Shared\Infrastructure\Slim\Tests;
namespace Tests\Shared\Infrastructure\Slim;

use Exception;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Selective\TestTrait\Traits\HttpTestTrait;
use Shared\Infrastructure\Settings\Settings;
use Shared\Infrastructure\Settings\InMemorySettings;
use Shared\Infrastructure\Settings\SettingsInterface;
use Shared\Infrastructure\Slim\MicroserviceSlim;
use Shared\Infrastructure\Slim\MicroserviceSlimInterface;
use Shared\Infrastructure\Slim\Tests\Utils\TestCase;
use Tests\Shared\Infrastructure\Slim\Utils\TestCase;


final class MicroserviceSlimTest extends TestCase
{
Expand All @@ -29,7 +30,7 @@ public function testApplicationHasBeenCreated(): void
*/
public function testGetSettings(): void
{
$expected = Settings::class;
$expected = InMemorySettings::class;
$actual = $this->microservice->getContainer()->get(SettingsInterface::class);

$this->assertInstanceOf($expected, $actual);
Expand All @@ -48,7 +49,7 @@ public function testHandleRequest(): void
* @throws NotFoundExceptionInterface
* @throws Exception
*/
protected function setUp(): void
public function setUp(): void
{
parent::setUp();

Expand Down
4 changes: 2 additions & 2 deletions tests/Utils/TestCase.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Shared\Infrastructure\Slim\Tests\Utils;
namespace Tests\Shared\Infrastructure\Slim\Utils;

use Exception;
use PHPUnit\Framework\TestCase as UnitTestCase;
Expand All @@ -18,7 +18,7 @@ class TestCase extends UnitTestCase
*/
protected function setUp(): void
{
$container = ContainerFactory::buildContainer(__DIR__ . '/../../config/settings.php');
$container = ContainerFactory::create(__DIR__ . '/../../config/settings.php');
$this->setUpContainer($container);
}
}

0 comments on commit 40333f6

Please sign in to comment.