ver. 0.279: Newsletter frontend migration, Languages facade elimination, bug fix newsletter_unsubscribe

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-16 15:11:38 +01:00
parent 59b36f48b1
commit 3b32ea0b9b
54 changed files with 579 additions and 294 deletions

View File

@@ -5,23 +5,26 @@ use PHPUnit\Framework\TestCase;
use admin\Controllers\ShopProductController;
use Domain\Product\ProductRepository;
use Domain\Integrations\IntegrationsRepository;
use Domain\Languages\LanguagesRepository;
class ShopProductControllerTest extends TestCase
{
private $repository;
private $integrationsRepository;
private $languagesRepository;
private $controller;
protected function setUp(): void
{
$this->repository = $this->createMock(ProductRepository::class);
$this->integrationsRepository = $this->createMock(IntegrationsRepository::class);
$this->controller = new ShopProductController($this->repository, $this->integrationsRepository);
$this->languagesRepository = $this->createMock(LanguagesRepository::class);
$this->controller = new ShopProductController($this->repository, $this->integrationsRepository, $this->languagesRepository);
}
public function testConstructorAcceptsRepositories(): void
{
$controller = new ShopProductController($this->repository, $this->integrationsRepository);
$controller = new ShopProductController($this->repository, $this->integrationsRepository, $this->languagesRepository);
$this->assertInstanceOf(ShopProductController::class, $controller);
}
@@ -105,9 +108,10 @@ class ShopProductControllerTest extends TestCase
$constructor = $reflection->getConstructor();
$params = $constructor->getParameters();
$this->assertCount(2, $params);
$this->assertCount(3, $params);
$this->assertEquals('Domain\Product\ProductRepository', $params[0]->getType()->getName());
$this->assertEquals('Domain\Integrations\IntegrationsRepository', $params[1]->getType()->getName());
$this->assertEquals('Domain\Languages\LanguagesRepository', $params[2]->getType()->getName());
}
public function testHasFormBuildingHelpers(): void