Skip to content

Commit

Permalink
refactor: rename Module example in tests BindingInterfacesWithInnerDe…
Browse files Browse the repository at this point in the history
…pendencies
  • Loading branch information
Chemaclass committed Aug 17, 2024
1 parent 0b9d700 commit 53ac6e2
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Gacela\Framework\Bootstrap\GacelaConfig;
use Gacela\Framework\Gacela;
use GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\LocalConfig\Domain\Greeter\CorrectCompanyGenerator;
use GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\Module\Domain\Greeter\CorrectCompanyGenerator;
use PHPUnit\Framework\TestCase;

final class FeatureTest extends TestCase
Expand All @@ -23,7 +23,7 @@ public function test_mapping_interfaces_from_config(): void
{
self::assertSame(
'Hello Gacela! Name: Chemaclass & Jesus',
(new LocalConfig\Facade())->generateCompanyAndName(),
(new Module\Facade())->generateCompanyAndName(),
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\LocalConfig\Domain\Greeter;
namespace GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\Module\Domain\Greeter;

use GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\LocalConfig\Domain\GreeterGeneratorInterface;
use GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\Module\Domain\GreeterGeneratorInterface;

use function sprintf;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\LocalConfig\Domain\Greeter;
namespace GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\Module\Domain\Greeter;

final class CustomNameGenerator
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\LocalConfig\Domain\Greeter;
namespace GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\Module\Domain\Greeter;

use GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\LocalConfig\Domain\GreeterGeneratorInterface;
use GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\Module\Domain\GreeterGeneratorInterface;
use RuntimeException;

final class IncorrectCompanyGenerator implements GreeterGeneratorInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\LocalConfig\Domain;
namespace GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\Module\Domain;

interface GreeterGeneratorInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\LocalConfig\Domain;
namespace GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\Module\Domain;

final class GreeterService
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\LocalConfig;
namespace GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\Module;

use Gacela\Framework\AbstractFacade;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

declare(strict_types=1);

namespace GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\LocalConfig;
namespace GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\Module;

use Gacela\Framework\AbstractFactory;
use GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\LocalConfig\Domain\GreeterGeneratorInterface;
use GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\LocalConfig\Domain\GreeterService;
use GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\Module\Domain\GreeterGeneratorInterface;
use GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\Module\Domain\GreeterService;

final class Factory extends AbstractFactory
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
declare(strict_types=1);

use Gacela\Framework\Bootstrap\GacelaConfig;
use GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\LocalConfig\Domain\Greeter\IncorrectCompanyGenerator;
use GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\LocalConfig\Domain\GreeterGeneratorInterface;
use GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\Module\Domain\Greeter\IncorrectCompanyGenerator;
use GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\Module\Domain\GreeterGeneratorInterface;

return static function (GacelaConfig $config): void {
$config->addMappingInterface(GreeterGeneratorInterface::class, IncorrectCompanyGenerator::class);
$config->addBinding(GreeterGeneratorInterface::class, IncorrectCompanyGenerator::class);

// Overriding the `GreeterGeneratorInterface` with the proper external service.
// Check the FeatureTest class to see how the external service with key `greeterGenerator` is defined.
Expand Down

0 comments on commit 53ac6e2

Please sign in to comment.