/
githubmirror
/
symfony
Обзор
Документация
Войти
/
githubmirror
/
symfony
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
8.2
src/Symfony/Component/Workflow/Tests/ArcTest.php
40 строк
1023 B
Marvin Bölsterli
empty string condition for place name
10 дек 2025, 17:09
10 дек 2025, 17:09
ffcc341
Код
Авторство
О чём код?
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Workflow\Tests; use PHPUnit\Framework\TestCase; use Symfony\Component\Workflow\Arc; class ArcTest extends TestCase { public function testConstructorWithInvalidPlaceName() { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('The place name cannot be empty.'); new Arc('', 1); } public function testConstructorWithInvalidWeight() { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('The weight must be greater than 0, 0 given.'); new Arc('not empty', 0); } public function testConstructorWithZeroPlaceName() { $arc = new Arc('0', 1); $this->assertEquals('0', $arc->place); } }