Skip to content

Commit e2d9892

Browse files
authored
Remove phpunit @Covers annotations (#4)
* Remove phpunit @Covers annotations * Fix phpunit
1 parent 49ddbb5 commit e2d9892

11 files changed

+0
-228
lines changed

phpunit.xml

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
bootstrap="vendor/autoload.php"
55
cacheResultFile=".phpunit.cache/test-results"
66
executionOrder="depends,defects"
7-
forceCoversAnnotation="true"
87
beStrictAboutOutputDuringTests="true"
98
beStrictAboutTodoAnnotatedTests="true"
109
failOnRisky="true"

tests/Unit/Property/PropertyTest.php

-41
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ private function mockSchema(object $jsonSchema = null): ObjectProphecy
2222
return $schema;
2323
}
2424

25-
/**
26-
* @covers \JsonSchema\Property\Property::__construct
27-
*/
2825
public function testConstruct(): void
2926
{
3027
$jsonSchema = (object) [];
@@ -36,9 +33,6 @@ public function testConstruct(): void
3633
static::assertSame($jsonSchema, $property->toJsonSchema());
3734
}
3835

39-
/**
40-
* @covers \JsonSchema\Property\Property::create
41-
*/
4236
public function testCreate(): void
4337
{
4438
$jsonSchema = (object) [];
@@ -50,10 +44,6 @@ public function testCreate(): void
5044
static::assertSame($jsonSchema, $property->toJsonSchema());
5145
}
5246

53-
/**
54-
* @covers \JsonSchema\Property\Property::name
55-
* @covers \JsonSchema\Property\Property::getName
56-
*/
5747
public function testName(): void
5848
{
5949
$schema = $this->mockSchema();
@@ -65,10 +55,6 @@ public function testName(): void
6555
static::assertSame('another-name', $property2->getName());
6656
}
6757

68-
/**
69-
* @covers \JsonSchema\Property\Property::required
70-
* @covers \JsonSchema\Property\Property::isRequired
71-
*/
7258
public function testRequired(): void
7359
{
7460
$schema = $this->mockSchema();
@@ -80,10 +66,6 @@ public function testRequired(): void
8066
static::assertTrue($property2->isRequired());
8167
}
8268

83-
/**
84-
* @covers \JsonSchema\Property\Property::schema
85-
* @covers \JsonSchema\Property\Property::toJsonSchema
86-
*/
8769
public function testSchema(): void
8870
{
8971
$jsonSchema1 = (object) [];
@@ -99,10 +81,6 @@ public function testSchema(): void
9981
static::assertSame($jsonSchema2, $property2->toJsonSchema());
10082
}
10183

102-
/**
103-
* @covers \JsonSchema\Property\Property::dependentRequired
104-
* @covers \JsonSchema\Property\Property::getDependentRequired
105-
*/
10684
public function testDependentRequired(): void
10785
{
10886
$schema = $this->mockSchema();
@@ -114,9 +92,6 @@ public function testDependentRequired(): void
11492
static::assertSame(['foo', 'bar'], $property2->getDependentRequired());
11593
}
11694

117-
/**
118-
* @covers \JsonSchema\Property\Property::dependentRequired
119-
*/
12095
public function testDependentRequiredWithEmptyArray(): void
12196
{
12297
$schema = $this->mockSchema();
@@ -127,9 +102,6 @@ public function testDependentRequiredWithEmptyArray(): void
127102
$property->dependentRequired([]);
128103
}
129104

130-
/**
131-
* @covers \JsonSchema\Property\Property::dependentRequired
132-
*/
133105
public function testDependentRequiredWithMap(): void
134106
{
135107
$schema = $this->mockSchema();
@@ -140,9 +112,6 @@ public function testDependentRequiredWithMap(): void
140112
$property->dependentRequired(['foo' => 'bar', 'bar' => 'baz']);
141113
}
142114

143-
/**
144-
* @covers \JsonSchema\Property\Property::dependentRequired
145-
*/
146115
public function testDependentRequiredWithNonUniqueValues(): void
147116
{
148117
$schema = $this->mockSchema();
@@ -153,9 +122,6 @@ public function testDependentRequiredWithNonUniqueValues(): void
153122
$property->dependentRequired(['foo', 'foo']);
154123
}
155124

156-
/**
157-
* @covers \JsonSchema\Property\Property::dependentRequired
158-
*/
159125
public function testDependentRequiredWithEmptyString(): void
160126
{
161127
$schema = $this->mockSchema();
@@ -166,10 +132,6 @@ public function testDependentRequiredWithEmptyString(): void
166132
$property->dependentRequired(['foo', '']);
167133
}
168134

169-
/**
170-
* @covers \JsonSchema\Property\Property::dependentSchema
171-
* @covers \JsonSchema\Property\Property::getDependentSchema
172-
*/
173135
public function testDependentSchema(): void
174136
{
175137
$schema1 = $this->mockSchema();
@@ -184,9 +146,6 @@ public function testDependentSchema(): void
184146
static::assertSame($jsonSchema2, $property2->getDependentSchema());
185147
}
186148

187-
/**
188-
* @covers \JsonSchema\Property\Property::toJsonSchema
189-
*/
190149
public function testToJsonSchema(): void
191150
{
192151
$jsonSchema = (object) [];

tests/Unit/Schema/AbstractSchemaTest.php

-60
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,13 @@ protected function mockSchema(object $jsonSchema): ObjectProphecy
6161
return $schema;
6262
}
6363

64-
/**
65-
* @covers \JsonSchema\Schema\AbstractSchema::create
66-
*/
6764
public function testCreate(): void
6865
{
6966
$schema = static::getSchemaClass()::create();
7067

7168
static::assertJsonSchemaEquals([], $schema->toJsonSchema());
7269
}
7370

74-
/**
75-
* @covers \JsonSchema\Schema\AbstractSchema::with
76-
*/
7771
public function testWith(): void
7872
{
7973
$keyword1 = $this->mockKeyword('foo', 'bar');
@@ -94,9 +88,6 @@ public function testWith(): void
9488
static::assertJsonSchemaEquals(['foo' => null], $schema5->toJsonSchema());
9589
}
9690

97-
/**
98-
* @covers \JsonSchema\Schema\AbstractSchema::comment
99-
*/
10091
public function testComment(): void
10192
{
10293
$schema1 = static::createSchema();
@@ -108,9 +99,6 @@ public function testComment(): void
10899
static::assertJsonSchemaEquals([], $schema3->toJsonSchema());
109100
}
110101

111-
/**
112-
* @covers \JsonSchema\Schema\AbstractSchema::title
113-
*/
114102
public function testTitle(): void
115103
{
116104
$schema1 = static::createSchema();
@@ -122,9 +110,6 @@ public function testTitle(): void
122110
static::assertJsonSchemaEquals([], $schema3->toJsonSchema());
123111
}
124112

125-
/**
126-
* @covers \JsonSchema\Schema\AbstractSchema::description
127-
*/
128113
public function testDescription(): void
129114
{
130115
$schema1 = static::createSchema();
@@ -136,9 +121,6 @@ public function testDescription(): void
136121
static::assertJsonSchemaEquals([], $schema3->toJsonSchema());
137122
}
138123

139-
/**
140-
* @covers \JsonSchema\Schema\AbstractSchema::deprecated
141-
*/
142124
public function testDeprecated(): void
143125
{
144126
$schema1 = static::createSchema();
@@ -152,9 +134,6 @@ public function testDeprecated(): void
152134
static::assertJsonSchemaEquals([], $schema4->toJsonSchema());
153135
}
154136

155-
/**
156-
* @covers \JsonSchema\Schema\AbstractSchema::readOnly
157-
*/
158137
public function testReadOnly(): void
159138
{
160139
$schema1 = static::createSchema();
@@ -168,9 +147,6 @@ public function testReadOnly(): void
168147
static::assertJsonSchemaEquals([], $schema4->toJsonSchema());
169148
}
170149

171-
/**
172-
* @covers \JsonSchema\Schema\AbstractSchema::writeOnly
173-
*/
174150
public function testWriteOnly(): void
175151
{
176152
$schema1 = static::createSchema();
@@ -184,9 +160,6 @@ public function testWriteOnly(): void
184160
static::assertJsonSchemaEquals([], $schema4->toJsonSchema());
185161
}
186162

187-
/**
188-
* @covers \JsonSchema\Schema\AbstractSchema::default
189-
*/
190163
public function testDefault(): void
191164
{
192165
$schema1 = static::createSchema();
@@ -210,9 +183,6 @@ public function testDefault(): void
210183
static::assertJsonSchemaEquals(['default' => null], $schema9->toJsonSchema());
211184
}
212185

213-
/**
214-
* @covers \JsonSchema\Schema\AbstractSchema::examples
215-
*/
216186
public function testExamples(): void
217187
{
218188
$schema1 = static::createSchema();
@@ -242,9 +212,6 @@ public function testExamples(): void
242212
static::assertJsonSchemaEquals([], $schema3->toJsonSchema());
243213
}
244214

245-
/**
246-
* @covers \JsonSchema\Schema\AbstractSchema::anyOf
247-
*/
248215
public function testAnyOf(): void
249216
{
250217
$anyOf1 = $this->mockSchema((object) ['foo' => 'bar']);
@@ -266,9 +233,6 @@ public function testAnyOf(): void
266233
static::assertJsonSchemaEquals([], $schema4->toJsonSchema());
267234
}
268235

269-
/**
270-
* @covers \JsonSchema\Schema\AbstractSchema::allOf
271-
*/
272236
public function testAllOf(): void
273237
{
274238
$allOf1 = $this->mockSchema((object) ['foo' => 'bar']);
@@ -290,9 +254,6 @@ public function testAllOf(): void
290254
static::assertJsonSchemaEquals([], $schema4->toJsonSchema());
291255
}
292256

293-
/**
294-
* @covers \JsonSchema\Schema\AbstractSchema::oneOf
295-
*/
296257
public function testOneOf(): void
297258
{
298259
$oneOf1 = $this->mockSchema((object) ['foo' => 'bar']);
@@ -314,9 +275,6 @@ public function testOneOf(): void
314275
static::assertJsonSchemaEquals([], $schema4->toJsonSchema());
315276
}
316277

317-
/**
318-
* @covers \JsonSchema\Schema\AbstractSchema::not
319-
*/
320278
public function testNot(): void
321279
{
322280
$not = $this->mockSchema((object) ['foo' => 'bar']);
@@ -330,9 +288,6 @@ public function testNot(): void
330288
static::assertJsonSchemaEquals([], $schema3->toJsonSchema());
331289
}
332290

333-
/**
334-
* @covers \JsonSchema\Schema\AbstractSchema::if
335-
*/
336291
public function testIf(): void
337292
{
338293
$if = $this->mockSchema((object) ['foo' => 'bar']);
@@ -346,9 +301,6 @@ public function testIf(): void
346301
static::assertJsonSchemaEquals([], $schema3->toJsonSchema());
347302
}
348303

349-
/**
350-
* @covers \JsonSchema\Schema\AbstractSchema::then
351-
*/
352304
public function testThen(): void
353305
{
354306
$then = $this->mockSchema((object) ['foo' => 'bar']);
@@ -362,9 +314,6 @@ public function testThen(): void
362314
static::assertJsonSchemaEquals([], $schema3->toJsonSchema());
363315
}
364316

365-
/**
366-
* @covers \JsonSchema\Schema\AbstractSchema::else
367-
*/
368317
public function testElse(): void
369318
{
370319
$else = $this->mockSchema((object) ['foo' => 'bar']);
@@ -378,9 +327,6 @@ public function testElse(): void
378327
static::assertJsonSchemaEquals([], $schema3->toJsonSchema());
379328
}
380329

381-
/**
382-
* @covers \JsonSchema\Schema\AbstractSchema::const
383-
*/
384330
public function testConst(): void
385331
{
386332
$schema1 = static::createSchema();
@@ -404,9 +350,6 @@ public function testConst(): void
404350
static::assertJsonSchemaEquals(['const' => null], $schema9->toJsonSchema());
405351
}
406352

407-
/**
408-
* @covers \JsonSchema\Schema\AbstractSchema::enum
409-
*/
410353
public function testEnum(): void
411354
{
412355
$schema1 = static::createSchema();
@@ -436,9 +379,6 @@ public function testEnum(): void
436379
static::assertJsonSchemaEquals([], $schema3->toJsonSchema());
437380
}
438381

439-
/**
440-
* @covers \JsonSchema\Schema\AbstractSchema::toJsonSchema
441-
*/
442382
public function testToJsonSchema(): void
443383
{
444384
$keyword1 = $this->mockKeyword('foo', 'bar');

0 commit comments

Comments
 (0)