/
dimamir
/
Wsdl_PackageGenerator
Обзор
Документация
Войти
/
dimamir
/
Wsdl_PackageGenerator
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
tests/Container/PhpElement/MethodTest.php
36 строк
915 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\Method; use WsdlToPhp\PackageGenerator\Tests\AbstractTestCase; use WsdlToPhp\PhpGenerator\Element\PhpConstant; use WsdlToPhp\PhpGenerator\Element\PhpMethod; /** * @internal * @coversDefaultClass */ final class MethodTest extends AbstractTestCase { public function testAdd(): void { $method = new Method(self::getBingGeneratorInstance()); $method->add(new PhpMethod('foo')); $this->assertCount(1, $method); $this->assertInstanceOf(PhpMethod::class, $method->get('foo')); } public function testAddWithException(): void { $this->expectException(\InvalidArgumentException::class); $method = new Method(self::getBingGeneratorInstance()); $method->add(new PhpConstant('Bar')); } }