Files
shopPRO/tests/Unit/Domain/Settings/SettingsRepositoryTest.php
Jacek Pyziak 1c88f8adfa Add new settings and cache repository files, update admin settings controller and templates
- Introduced new `SettingsRepository` and `CacheRepository` classes in the `autoload\Domain` namespace.
- Updated `SettingsController` in the `admin\Controllers` namespace to enhance settings management.
- Added new templates for settings in `admin\templates\settings` and `admin\templates\site`.
- Improved overall structure and organization of settings-related files.
2026-02-05 23:32:48 +01:00

34 lines
1008 B
PHP

<?php
namespace Tests\Unit\Domain\Settings;
use PHPUnit\Framework\TestCase;
use Domain\Settings\SettingsRepository;
/**
* Testy dla SettingsRepository
*
* UWAGA: SettingsRepository jest krokiem pośrednim migracji - deleguje do
* statycznych metod admin\factory\Settings. Pełne testy jednostkowe z mockami
* będą możliwe po migracji do DI (jak ProductRepository/BannerRepository).
*
* Na razie testujemy tylko to, co da się zweryfikować bez bazy danych.
*/
class SettingsRepositoryTest extends TestCase
{
public function testCanBeInstantiated(): void
{
$repository = new SettingsRepository();
$this->assertInstanceOf(SettingsRepository::class, $repository);
}
public function testHasSaveSettingsMethod(): void
{
$this->assertTrue(method_exists(SettingsRepository::class, 'saveSettings'));
}
public function testHasGetSettingsMethod(): void
{
$this->assertTrue(method_exists(SettingsRepository::class, 'getSettings'));
}
}