From 1394773fa96958060277774dd57844750986980b Mon Sep 17 00:00:00 2001 From: Aleksey Filippov Date: Fri, 16 Jan 2026 17:56:38 +0300 Subject: [PATCH] =?utf8?q?[ERP-500]=20=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD?= =?utf8?q?=D0=B8=D0=B5=20=D1=84=D0=B8=D0=BA=D1=81=D1=82=D1=83=D1=80=20?= =?utf8?q?=D0=B8=D0=B7=20CityTest?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Тесты валидации модели City не требуют данных из БД. Убран метод _fixtures() который загружал данные в таблицу city и вызывал ошибку PostgreSQL enum (city_dop не принимает пустую строку). Co-Authored-By: Claude Opus 4.5 --- erp24/tests/unit/models/CityTest.php | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) 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', - ], - ]; - } - /** * Тест: пустые обязательные поля не проходят валидацию */ -- 2.39.5