OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
API
/
vendor
/
zircote
/
swagger-php
/
tests
/
Analysers
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/07/2024 04:34:33 AM
rwxr-xr-x
📄
AttributeAnnotationFactoryTest.php
1.06 KB
08/07/2024 04:34:31 AM
rw-r--r--
📄
ComposerAutoloaderScannerTest.php
1 KB
08/07/2024 04:34:31 AM
rw-r--r--
📄
DocBlockParserTest.php
1.66 KB
08/07/2024 04:34:31 AM
rw-r--r--
📄
ReflectionAnalyserTest.php
7.25 KB
08/07/2024 04:34:31 AM
rw-r--r--
📄
TokenAnalyserTest.php
14.24 KB
08/07/2024 04:34:31 AM
rw-r--r--
📄
TokenScannerTest.php
14.19 KB
08/07/2024 04:34:31 AM
rw-r--r--
Editing: AttributeAnnotationFactoryTest.php
Close
<?php declare(strict_types=1); /** * @license Apache 2.0 */ namespace OpenApi\Tests\Analysers; use OpenApi\Analysers\AttributeAnnotationFactory; use OpenApi\Tests\Fixtures\UsingAttributes; use OpenApi\Tests\Fixtures\InvalidPropertyAttribute; use OpenApi\Tests\OpenApiTestCase; /** * @requires PHP 8.1 */ class AttributeAnnotationFactoryTest extends OpenApiTestCase { public function testReturnedAnnotationsCout(): void { $rc = new \ReflectionClass(UsingAttributes::class); $annotations = (new AttributeAnnotationFactory())->build($rc, $this->getContext()); $this->assertCount(1, $annotations); } public function testErrorOnInvalidAttribute(): void { $instance = new InvalidPropertyAttribute(); $rm = new \ReflectionMethod($instance, 'post'); $this->expectException(\TypeError::class); $this->expectExceptionMessage('OpenApi\Attributes\Property::__construct(): Argument #8 ($required) must be of type ?array'); (new AttributeAnnotationFactory())->build($rm, $this->getContext()); } }