• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

api-platform / core / 10323369133

09 Aug 2024 05:39PM UTC coverage: 7.841%. Remained the same
10323369133

push

github

web-flow
Merge 3.4 (#6507)

* tests: remove output suffix after reverting

* cs: remove unnecessary comments (#6408)

* fix(elasticsearch): change normalize return type to compatible with other normalizers (#6493)

* style: various cs fixes (#6504)

* cs: fixes

* chore: phpstan fixes

* style: cs fixes

---------

Co-authored-by: Takashi Kanemoto <4360663+ttskch@users.noreply.github.com>
Co-authored-by: Koen Pasman <118996061+Koenstell@users.noreply.github.com>

0 of 2 new or added lines in 1 file covered. (0.0%)

21 existing lines in 7 files now uncovered.

12688 of 161818 relevant lines covered (7.84%)

26.86 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/JsonSchema/Tests/SchemaFactoryTest.php
1
<?php
2

3
/*
4
 * This file is part of the API Platform project.
5
 *
6
 * (c) Kévin Dunglas <dunglas@gmail.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11

12
declare(strict_types=1);
13

14
namespace ApiPlatform\JsonSchema\Tests;
15

16
use ApiPlatform\JsonSchema\DefinitionNameFactory;
17
use ApiPlatform\JsonSchema\Schema;
18
use ApiPlatform\JsonSchema\SchemaFactory;
19
use ApiPlatform\JsonSchema\Tests\Fixtures\ApiResource\OverriddenOperationDummy;
20
use ApiPlatform\JsonSchema\Tests\Fixtures\DummyResourceInterface;
21
use ApiPlatform\JsonSchema\Tests\Fixtures\Enum\GenderTypeEnum;
22
use ApiPlatform\JsonSchema\Tests\Fixtures\NotAResource;
23
use ApiPlatform\JsonSchema\Tests\Fixtures\NotAResourceWithUnionIntersectTypes;
24
use ApiPlatform\JsonSchema\Tests\Fixtures\Serializable;
25
use ApiPlatform\Metadata\ApiProperty;
26
use ApiPlatform\Metadata\ApiResource;
27
use ApiPlatform\Metadata\Operations;
28
use ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface;
29
use ApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface;
30
use ApiPlatform\Metadata\Property\PropertyNameCollection;
31
use ApiPlatform\Metadata\Put;
32
use ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface;
33
use ApiPlatform\Metadata\Resource\ResourceMetadataCollection;
34
use ApiPlatform\Metadata\ResourceClassResolverInterface;
35
use PHPUnit\Framework\TestCase;
36
use Prophecy\Argument;
37
use Prophecy\PhpUnit\ProphecyTrait;
38
use Symfony\Component\PropertyInfo\Type;
39
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
40

41
class SchemaFactoryTest extends TestCase
42
{
43
    use ProphecyTrait;
44

45
    public function testBuildSchemaForNonResourceClass(): void
46
    {
47
        $resourceMetadataFactoryProphecy = $this->prophesize(ResourceMetadataCollectionFactoryInterface::class);
×
48

49
        $propertyNameCollectionFactoryProphecy = $this->prophesize(PropertyNameCollectionFactoryInterface::class);
×
50
        $propertyNameCollectionFactoryProphecy->create(NotAResource::class, Argument::cetera())->willReturn(new PropertyNameCollection(['foo', 'bar', 'genderType']));
×
51

52
        $propertyMetadataFactoryProphecy = $this->prophesize(PropertyMetadataFactoryInterface::class);
×
53
        $propertyMetadataFactoryProphecy->create(NotAResource::class, 'foo', Argument::cetera())->willReturn(
×
54
            (new ApiProperty())
×
55
                ->withBuiltinTypes([new Type(Type::BUILTIN_TYPE_STRING)])
×
56
                ->withReadable(true)
×
57
                ->withSchema(['type' => 'string'])
×
58
        );
×
59
        $propertyMetadataFactoryProphecy->create(NotAResource::class, 'bar', Argument::cetera())->willReturn(
×
60
            (new ApiProperty())
×
61
                ->withBuiltinTypes([new Type(Type::BUILTIN_TYPE_INT)])
×
62
                ->withReadable(true)
×
63
                ->withDefault('default_bar')
×
64
                ->withExample('example_bar')
×
65
                ->withSchema(['type' => 'integer', 'default' => 'default_bar', 'example' => 'example_bar'])
×
66
        );
×
67
        $propertyMetadataFactoryProphecy->create(NotAResource::class, 'genderType', Argument::cetera())->willReturn(
×
68
            (new ApiProperty())
×
69
                ->withBuiltinTypes([new Type(Type::BUILTIN_TYPE_OBJECT)])
×
70
                ->withReadable(true)
×
71
                ->withDefault('male')
×
72
                ->withSchema(['type' => 'object', 'default' => 'male', 'example' => 'male'])
×
73
        );
×
74

75
        $resourceClassResolverProphecy = $this->prophesize(ResourceClassResolverInterface::class);
×
76
        $resourceClassResolverProphecy->isResourceClass(NotAResource::class)->willReturn(false);
×
77

78
        $definitionNameFactory = new DefinitionNameFactory(['jsonapi' => true, 'jsonhal' => true, 'jsonld' => true]);
×
79

80
        $schemaFactory = new SchemaFactory(
×
81
            resourceMetadataFactory: $resourceMetadataFactoryProphecy->reveal(),
×
82
            propertyNameCollectionFactory: $propertyNameCollectionFactoryProphecy->reveal(),
×
83
            propertyMetadataFactory: $propertyMetadataFactoryProphecy->reveal(),
×
84
            resourceClassResolver: $resourceClassResolverProphecy->reveal(),
×
85
            definitionNameFactory: $definitionNameFactory,
×
86
        );
×
87
        $resultSchema = $schemaFactory->buildSchema(NotAResource::class);
×
88

89
        $rootDefinitionKey = $resultSchema->getRootDefinitionKey();
×
90
        $definitions = $resultSchema->getDefinitions();
×
91

92
        $this->assertSame((new \ReflectionClass(NotAResource::class))->getShortName(), $rootDefinitionKey);
×
UNCOV
93
        $this->assertTrue(isset($definitions[$rootDefinitionKey]));
×
94
        $this->assertArrayHasKey('type', $definitions[$rootDefinitionKey]);
×
95
        $this->assertSame('object', $definitions[$rootDefinitionKey]['type']);
×
96
        $this->assertArrayNotHasKey('additionalProperties', $definitions[$rootDefinitionKey]);
×
97
        $this->assertArrayHasKey('properties', $definitions[$rootDefinitionKey]);
×
98
        $this->assertArrayHasKey('foo', $definitions[$rootDefinitionKey]['properties']);
×
99
        $this->assertArrayHasKey('type', $definitions[$rootDefinitionKey]['properties']['foo']);
×
100
        $this->assertArrayNotHasKey('default', $definitions[$rootDefinitionKey]['properties']['foo']);
×
101
        $this->assertArrayNotHasKey('example', $definitions[$rootDefinitionKey]['properties']['foo']);
×
102
        $this->assertSame('string', $definitions[$rootDefinitionKey]['properties']['foo']['type']);
×
103
        $this->assertArrayHasKey('bar', $definitions[$rootDefinitionKey]['properties']);
×
104
        $this->assertArrayHasKey('type', $definitions[$rootDefinitionKey]['properties']['bar']);
×
105
        $this->assertArrayHasKey('default', $definitions[$rootDefinitionKey]['properties']['bar']);
×
106
        $this->assertArrayHasKey('example', $definitions[$rootDefinitionKey]['properties']['bar']);
×
107
        $this->assertSame('integer', $definitions[$rootDefinitionKey]['properties']['bar']['type']);
×
108
        $this->assertSame('default_bar', $definitions[$rootDefinitionKey]['properties']['bar']['default']);
×
109
        $this->assertSame('example_bar', $definitions[$rootDefinitionKey]['properties']['bar']['example']);
×
110

111
        $this->assertArrayHasKey('genderType', $definitions[$rootDefinitionKey]['properties']);
×
112
        $this->assertArrayHasKey('type', $definitions[$rootDefinitionKey]['properties']['genderType']);
×
113
        $this->assertArrayHasKey('default', $definitions[$rootDefinitionKey]['properties']['genderType']);
×
114
        $this->assertArrayHasKey('example', $definitions[$rootDefinitionKey]['properties']['genderType']);
×
115
        $this->assertSame('object', $definitions[$rootDefinitionKey]['properties']['genderType']['type']);
×
116
        $this->assertSame('male', $definitions[$rootDefinitionKey]['properties']['genderType']['default']);
×
117
        $this->assertSame('male', $definitions[$rootDefinitionKey]['properties']['genderType']['example']);
×
118
    }
119

120
    public function testBuildSchemaForNonResourceClassWithUnionIntersectTypes(): void
121
    {
122
        $resourceMetadataFactoryProphecy = $this->prophesize(ResourceMetadataCollectionFactoryInterface::class);
×
123

124
        $propertyNameCollectionFactoryProphecy = $this->prophesize(PropertyNameCollectionFactoryInterface::class);
×
125
        $propertyNameCollectionFactoryProphecy->create(NotAResourceWithUnionIntersectTypes::class, Argument::cetera())->willReturn(new PropertyNameCollection(['ignoredProperty', 'unionType', 'intersectType']));
×
126

127
        $propertyMetadataFactoryProphecy = $this->prophesize(PropertyMetadataFactoryInterface::class);
×
128
        $propertyMetadataFactoryProphecy->create(NotAResourceWithUnionIntersectTypes::class, 'ignoredProperty', Argument::cetera())->willReturn(
×
129
            (new ApiProperty())
×
130
                ->withBuiltinTypes([new Type(Type::BUILTIN_TYPE_STRING, nullable: true)])
×
131
                ->withReadable(true)
×
132
                ->withSchema(['type' => ['string', 'null']])
×
133
        );
×
134
        $propertyMetadataFactoryProphecy->create(NotAResourceWithUnionIntersectTypes::class, 'unionType', Argument::cetera())->willReturn(
×
135
            (new ApiProperty())
×
136
                ->withBuiltinTypes([new Type(Type::BUILTIN_TYPE_STRING, nullable: true), new Type(Type::BUILTIN_TYPE_INT, nullable: true), new Type(Type::BUILTIN_TYPE_FLOAT, nullable: true)])
×
137
                ->withReadable(true)
×
138
                ->withSchema(['oneOf' => [
×
139
                    ['type' => ['string', 'null']],
×
140
                    ['type' => ['integer', 'null']],
×
141
                ]])
×
142
        );
×
143
        $propertyMetadataFactoryProphecy->create(NotAResourceWithUnionIntersectTypes::class, 'intersectType', Argument::cetera())->willReturn(
×
144
            (new ApiProperty())
×
145
                ->withBuiltinTypes([new Type(Type::BUILTIN_TYPE_OBJECT, class: Serializable::class), new Type(Type::BUILTIN_TYPE_OBJECT, class: DummyResourceInterface::class)])
×
146
                ->withReadable(true)
×
147
                ->withSchema(['type' => 'object'])
×
148
        );
×
149

150
        $resourceClassResolverProphecy = $this->prophesize(ResourceClassResolverInterface::class);
×
151
        $resourceClassResolverProphecy->isResourceClass(NotAResourceWithUnionIntersectTypes::class)->willReturn(false);
×
152

153
        $definitionNameFactory = new DefinitionNameFactory(['jsonapi' => true, 'jsonhal' => true, 'jsonld' => true]);
×
154

155
        $schemaFactory = new SchemaFactory(
×
156
            resourceMetadataFactory: $resourceMetadataFactoryProphecy->reveal(),
×
157
            propertyNameCollectionFactory: $propertyNameCollectionFactoryProphecy->reveal(),
×
158
            propertyMetadataFactory: $propertyMetadataFactoryProphecy->reveal(),
×
159
            resourceClassResolver: $resourceClassResolverProphecy->reveal(),
×
160
            definitionNameFactory: $definitionNameFactory,
×
161
        );
×
162
        $resultSchema = $schemaFactory->buildSchema(NotAResourceWithUnionIntersectTypes::class);
×
163

164
        $rootDefinitionKey = $resultSchema->getRootDefinitionKey();
×
165
        $definitions = $resultSchema->getDefinitions();
×
166

167
        $this->assertSame((new \ReflectionClass(NotAResourceWithUnionIntersectTypes::class))->getShortName(), $rootDefinitionKey);
×
UNCOV
168
        $this->assertTrue(isset($definitions[$rootDefinitionKey]));
×
169
        $this->assertArrayHasKey('type', $definitions[$rootDefinitionKey]);
×
170
        $this->assertSame('object', $definitions[$rootDefinitionKey]['type']);
×
171
        $this->assertArrayNotHasKey('additionalProperties', $definitions[$rootDefinitionKey]);
×
172
        $this->assertArrayHasKey('properties', $definitions[$rootDefinitionKey]);
×
173

174
        $this->assertArrayHasKey('ignoredProperty', $definitions[$rootDefinitionKey]['properties']);
×
175
        $this->assertArrayHasKey('type', $definitions[$rootDefinitionKey]['properties']['ignoredProperty']);
×
176
        $this->assertSame(['string', 'null'], $definitions[$rootDefinitionKey]['properties']['ignoredProperty']['type']);
×
177

178
        $this->assertArrayHasKey('unionType', $definitions[$rootDefinitionKey]['properties']);
×
179
        $this->assertArrayHasKey('oneOf', $definitions[$rootDefinitionKey]['properties']['unionType']);
×
180
        $this->assertCount(2, $definitions[$rootDefinitionKey]['properties']['unionType']['oneOf']);
×
181
        $this->assertArrayHasKey('type', $definitions[$rootDefinitionKey]['properties']['unionType']['oneOf'][0]);
×
182
        $this->assertSame(['string', 'null'], $definitions[$rootDefinitionKey]['properties']['unionType']['oneOf'][0]['type']);
×
183
        $this->assertSame(['integer', 'null'], $definitions[$rootDefinitionKey]['properties']['unionType']['oneOf'][1]['type']);
×
184

185
        $this->assertArrayHasKey('intersectType', $definitions[$rootDefinitionKey]['properties']);
×
186
        $this->assertArrayHasKey('type', $definitions[$rootDefinitionKey]['properties']['intersectType']);
×
187
        $this->assertSame('object', $definitions[$rootDefinitionKey]['properties']['intersectType']['type']);
×
188
    }
189

190
    public function testBuildSchemaWithSerializerGroups(): void
191
    {
192
        $shortName = (new \ReflectionClass(OverriddenOperationDummy::class))->getShortName();
×
193
        $resourceMetadataFactoryProphecy = $this->prophesize(ResourceMetadataCollectionFactoryInterface::class);
×
194
        $operation = (new Put())->withName('put')->withNormalizationContext([
×
195
            'groups' => 'overridden_operation_dummy_put',
×
196
            AbstractNormalizer::ALLOW_EXTRA_ATTRIBUTES => false,
×
197
        ])->withShortName($shortName)->withValidationContext(['groups' => ['validation_groups_dummy_put']]);
×
198
        $resourceMetadataFactoryProphecy->create(OverriddenOperationDummy::class)
×
199
            ->willReturn(
×
200
                new ResourceMetadataCollection(OverriddenOperationDummy::class, [
×
201
                    (new ApiResource())->withOperations(new Operations(['put' => $operation])),
×
202
                ])
×
203
            );
×
204

205
        $serializerGroup = 'custom_operation_dummy';
×
206

207
        $propertyNameCollectionFactoryProphecy = $this->prophesize(PropertyNameCollectionFactoryInterface::class);
×
208
        $propertyNameCollectionFactoryProphecy->create(OverriddenOperationDummy::class, Argument::type('array'))->willReturn(new PropertyNameCollection(['alias', 'description', 'genderType']));
×
209

210
        $propertyMetadataFactoryProphecy = $this->prophesize(PropertyMetadataFactoryInterface::class);
×
211
        $propertyMetadataFactoryProphecy->create(OverriddenOperationDummy::class, 'alias', Argument::type('array'))->willReturn(
×
212
            (new ApiProperty())
×
213
                ->withBuiltinTypes([new Type(Type::BUILTIN_TYPE_STRING)])
×
214
                ->withReadable(true)
×
215
                ->withSchema(['type' => 'string'])
×
216
        );
×
217
        $propertyMetadataFactoryProphecy->create(OverriddenOperationDummy::class, 'description', Argument::type('array'))->willReturn(
×
218
            (new ApiProperty())
×
219
                ->withBuiltinTypes([new Type(Type::BUILTIN_TYPE_STRING)])
×
220
                ->withReadable(true)
×
221
                ->withSchema(['type' => 'string'])
×
222
        );
×
223
        $propertyMetadataFactoryProphecy->create(OverriddenOperationDummy::class, 'genderType', Argument::type('array'))->willReturn(
×
224
            (new ApiProperty())
×
225
                ->withBuiltinTypes([new Type(Type::BUILTIN_TYPE_OBJECT, false, GenderTypeEnum::class)])
×
226
                ->withReadable(true)
×
227
                ->withDefault(GenderTypeEnum::MALE)
×
228
                ->withSchema(['type' => 'object'])
×
229
        );
×
230

231
        $resourceClassResolverProphecy = $this->prophesize(ResourceClassResolverInterface::class);
×
232
        $resourceClassResolverProphecy->isResourceClass(OverriddenOperationDummy::class)->willReturn(true);
×
233
        $resourceClassResolverProphecy->isResourceClass(GenderTypeEnum::class)->willReturn(true);
×
234

235
        $definitionNameFactory = new DefinitionNameFactory(['jsonapi' => true, 'jsonhal' => true, 'jsonld' => true]);
×
236

237
        $schemaFactory = new SchemaFactory(
×
238
            resourceMetadataFactory: $resourceMetadataFactoryProphecy->reveal(),
×
239
            propertyNameCollectionFactory: $propertyNameCollectionFactoryProphecy->reveal(),
×
240
            propertyMetadataFactory: $propertyMetadataFactoryProphecy->reveal(),
×
241
            resourceClassResolver: $resourceClassResolverProphecy->reveal(),
×
242
            definitionNameFactory: $definitionNameFactory,
×
243
        );
×
244
        $resultSchema = $schemaFactory->buildSchema(OverriddenOperationDummy::class, 'json', Schema::TYPE_OUTPUT, null, null, ['groups' => $serializerGroup, AbstractNormalizer::ALLOW_EXTRA_ATTRIBUTES => false]);
×
245

246
        $rootDefinitionKey = $resultSchema->getRootDefinitionKey();
×
247
        $definitions = $resultSchema->getDefinitions();
×
248

249
        $this->assertSame((new \ReflectionClass(OverriddenOperationDummy::class))->getShortName().'-'.$serializerGroup, $rootDefinitionKey);
×
UNCOV
250
        $this->assertTrue(isset($definitions[$rootDefinitionKey]));
×
251
        $this->assertArrayHasKey('type', $definitions[$rootDefinitionKey]);
×
252
        $this->assertSame('object', $definitions[$rootDefinitionKey]['type']);
×
253
        $this->assertFalse($definitions[$rootDefinitionKey]['additionalProperties']);
×
254
        $this->assertArrayHasKey('properties', $definitions[$rootDefinitionKey]);
×
255
        $this->assertArrayHasKey('alias', $definitions[$rootDefinitionKey]['properties']);
×
256
        $this->assertArrayHasKey('type', $definitions[$rootDefinitionKey]['properties']['alias']);
×
257
        $this->assertSame('string', $definitions[$rootDefinitionKey]['properties']['alias']['type']);
×
258
        $this->assertArrayHasKey('description', $definitions[$rootDefinitionKey]['properties']);
×
259
        $this->assertArrayHasKey('type', $definitions[$rootDefinitionKey]['properties']['description']);
×
260
        $this->assertSame('string', $definitions[$rootDefinitionKey]['properties']['description']['type']);
×
261
        $this->assertArrayHasKey('genderType', $definitions[$rootDefinitionKey]['properties']);
×
262
        $this->assertArrayHasKey('type', $definitions[$rootDefinitionKey]['properties']['genderType']);
×
263
        $this->assertArrayNotHasKey('default', $definitions[$rootDefinitionKey]['properties']['genderType']);
×
264
        $this->assertArrayNotHasKey('example', $definitions[$rootDefinitionKey]['properties']['genderType']);
×
265
        $this->assertSame('object', $definitions[$rootDefinitionKey]['properties']['genderType']['type']);
×
266
    }
267

268
    public function testBuildSchemaForAssociativeArray(): void
269
    {
270
        $resourceMetadataFactoryProphecy = $this->prophesize(ResourceMetadataCollectionFactoryInterface::class);
×
271

272
        $propertyNameCollectionFactoryProphecy = $this->prophesize(PropertyNameCollectionFactoryInterface::class);
×
273
        $propertyNameCollectionFactoryProphecy->create(NotAResource::class, Argument::cetera())->willReturn(new PropertyNameCollection(['foo', 'bar']));
×
274

275
        $propertyMetadataFactoryProphecy = $this->prophesize(PropertyMetadataFactoryInterface::class);
×
276
        $propertyMetadataFactoryProphecy->create(NotAResource::class, 'foo', Argument::cetera())->willReturn(
×
277
            (new ApiProperty())
×
278
                ->withBuiltinTypes([new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_STRING))])
×
279
                ->withReadable(true)
×
280
                ->withSchema(['type' => 'array', 'items' => ['string', 'int']])
×
281
        );
×
282
        $propertyMetadataFactoryProphecy->create(NotAResource::class, 'bar', Argument::cetera())->willReturn(
×
283
            (new ApiProperty())
×
284
                ->withBuiltinTypes([new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_STRING), new Type(Type::BUILTIN_TYPE_STRING))])
×
285
                ->withReadable(true)
×
286
                ->withSchema(['type' => 'object', 'additionalProperties' => 'string'])
×
287
        );
×
288

289
        $resourceClassResolverProphecy = $this->prophesize(ResourceClassResolverInterface::class);
×
290
        $resourceClassResolverProphecy->isResourceClass(NotAResource::class)->willReturn(false);
×
291

292
        $definitionNameFactory = new DefinitionNameFactory(['jsonapi' => true, 'jsonhal' => true, 'jsonld' => true]);
×
293

294
        $schemaFactory = new SchemaFactory(
×
295
            resourceMetadataFactory: $resourceMetadataFactoryProphecy->reveal(),
×
296
            propertyNameCollectionFactory: $propertyNameCollectionFactoryProphecy->reveal(),
×
297
            propertyMetadataFactory: $propertyMetadataFactoryProphecy->reveal(),
×
298
            resourceClassResolver: $resourceClassResolverProphecy->reveal(),
×
299
            definitionNameFactory: $definitionNameFactory,
×
300
        );
×
301
        $resultSchema = $schemaFactory->buildSchema(NotAResource::class);
×
302

303
        $rootDefinitionKey = $resultSchema->getRootDefinitionKey();
×
304
        $definitions = $resultSchema->getDefinitions();
×
305

306
        $this->assertSame((new \ReflectionClass(NotAResource::class))->getShortName(), $rootDefinitionKey);
×
UNCOV
307
        $this->assertTrue(isset($definitions[$rootDefinitionKey]));
×
308
        $this->assertArrayHasKey('properties', $definitions[$rootDefinitionKey]);
×
309
        $this->assertArrayHasKey('foo', $definitions[$rootDefinitionKey]['properties']);
×
310
        $this->assertArrayHasKey('type', $definitions[$rootDefinitionKey]['properties']['foo']);
×
311
        $this->assertArrayNotHasKey('additionalProperties', $definitions[$rootDefinitionKey]['properties']['foo']);
×
312
        $this->assertSame('array', $definitions[$rootDefinitionKey]['properties']['foo']['type']);
×
313
        $this->assertArrayHasKey('bar', $definitions[$rootDefinitionKey]['properties']);
×
314
        $this->assertArrayHasKey('type', $definitions[$rootDefinitionKey]['properties']['bar']);
×
315
        $this->assertArrayHasKey('additionalProperties', $definitions[$rootDefinitionKey]['properties']['bar']);
×
316
        $this->assertSame('object', $definitions[$rootDefinitionKey]['properties']['bar']['type']);
×
317
        $this->assertSame('string', $definitions[$rootDefinitionKey]['properties']['bar']['additionalProperties']);
×
318
    }
319
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc