]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
[ERP-500] Удаление фикстур из CityTest
authorAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Fri, 16 Jan 2026 14:56:38 +0000 (17:56 +0300)
committerAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Fri, 16 Jan 2026 14:56:38 +0000 (17:56 +0300)
Тесты валидации модели City не требуют данных из БД.
Убран метод _fixtures() который загружал данные в таблицу city
и вызывал ошибку PostgreSQL enum (city_dop не принимает пустую строку).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
erp24/tests/unit/models/CityTest.php

index 9e565a81f2a2ba35fe0fa87d83a3cb9d9589fe10..3fb4f04c4d52b31d655f948a9dd20a610d5dedcf 100644 (file)
@@ -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',
-            ],
-        ];
-    }
-
     /**
      * Тест: пустые обязательные поля не проходят валидацию
      */