/
dimamir
/
Wsdl_PackageGenerator
Обзор
Документация
Войти
/
dimamir
/
Wsdl_PackageGenerator
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
tests/Container/PhpElement/PropertyTest.php
36 строк
941 B
Mikaël DELSOL
issue #274 - Fix validation on scalar contained by array
20 фев 2023, 19:55
Не верифицирован
20 фев 2023, 19:55
a31d48e
Код
Авторство
О чём код?
<?php declare(strict_types=1); namespace WsdlToPhp\PackageGenerator\Tests\Container\PhpElement; use WsdlToPhp\PackageGenerator\Container\PhpElement\Property; use WsdlToPhp\PackageGenerator\Tests\AbstractTestCase; use WsdlToPhp\PhpGenerator\Element\PhpConstant; use WsdlToPhp\PhpGenerator\Element\PhpProperty; /** * @internal * @coversDefaultClass */ final class PropertyTest extends AbstractTestCase { public function testAdd(): void { $property = new Property(self::getBingGeneratorInstance()); $property->add(new PhpProperty('foo')); $this->assertCount(1, $property); $this->assertInstanceOf(PhpProperty::class, $property->get('foo')); } public function testAddWithException(): void { $this->expectException(\InvalidArgumentException::class); $property = new Property(self::getBingGeneratorInstance()); $property->add(new PhpConstant('Bar')); } }