/
AleksWork
/
diary_plants
Обзор
Документация
Войти
/
AleksWork
/
diary_plants
Код
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
tests/Unit/Domain/ValueObject/Repotting/RepottingDetailsTest.php
39 строк
1 KB
AlekseySerov
Fix some bugs in tests
09 апр 2026, 21:26
09 апр 2026, 21:26
a8e788d
Код
Авторство
О чём код?
<?php namespace Unit\Domain\ValueObject\Repotting; use PHPUnit\Framework\TestCase; use App\Domain\ValueObject\Enum\Repotting\PotMaterial; use App\Domain\ValueObject\Repotting\RepottingDetails; use App\Domain\ValueObject\Enum\Repotting\RepottingType; class RepottingDetailsTest extends TestCase { public function testInitialization(): void { $type = RepottingType::POTTING_UP; $material = PotMaterial::CERAMIC; $size = '14 см'; $details = new RepottingDetails($type, $material, $size); $this->assertSame($type, $details->getType()); $this->assertSame($material, $details->getMaterial()); $this->assertEquals($size, $details->getPotSize()); } public function testGettersReturnCorrectEnumCases(): void { $details = new RepottingDetails( RepottingType::EMERGENCY, PotMaterial::PLASTIC, '10' ); $this->assertInstanceOf(RepottingType::class, $details->getType()); $this->assertSame(RepottingType::EMERGENCY, $details->getType()); $this->assertInstanceOf(PotMaterial::class, $details->getMaterial()); $this->assertSame(PotMaterial::PLASTIC, $details->getMaterial()); } }