From: Aleksey Filippov Date: Fri, 16 Jan 2026 14:56:38 +0000 (+0300) Subject: [ERP-500] Удаление фикстур из CityTest X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=1394773fa96958060277774dd57844750986980b;p=erp24_rep%2Fyii-erp24%2F.git [ERP-500] Удаление фикстур из CityTest Тесты валидации модели City не требуют данных из БД. Убран метод _fixtures() который загружал данные в таблицу city и вызывал ошибку PostgreSQL enum (city_dop не принимает пустую строку). Co-Authored-By: Claude Opus 4.5 --- diff --git a/erp24/tests/unit/models/CityTest.php b/erp24/tests/unit/models/CityTest.php index 9e565a81..3fb4f04c 100644 --- a/erp24/tests/unit/models/CityTest.php +++ b/erp24/tests/unit/models/CityTest.php @@ -3,32 +3,16 @@ namespace tests\unit\models; use Codeception\Test\Unit; -use tests\fixtures\CityFixture; use yii_app\records\City; /** - * City model test + * City model validation tests + * + * Tests model validation rules without database interaction. + * No fixtures are loaded - tests work with model instances only. */ class CityTest extends Unit { - /** - * @var \tests\UnitTester - */ - protected $tester; - - /** - * @return array - */ - public function _fixtures(): array - { - return [ - 'city' => [ - 'class' => CityFixture::class, - 'dataFile' => '@app/tests/_data/city.php', - ], - ]; - } - /** * Тест: пустые обязательные поля не проходят валидацию */