Skip to content

Commit 723391d

Browse files
committed
Clean up internal codebase for tests
1 parent 189c99e commit 723391d

File tree

5 files changed

+2
-55
lines changed

5 files changed

+2
-55
lines changed

src/DomainTest.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ public function testDomainInternalPhpMethod(): void
5959
* @dataProvider countableProvider
6060
*
6161
* @param string[] $labels
62-
* @param ?string $domain
6362
*/
6463
public function testCountable(?string $domain, int $nbLabels, array $labels): void
6564
{
@@ -115,10 +114,6 @@ public function testLabels(): void
115114

116115
/**
117116
* @dataProvider toUnicodeProvider
118-
*
119-
* @param ?string $domain
120-
* @param ?string $expectedDomain
121-
* @param ?string $expectedIDNDomain
122117
*/
123118
public function testToIDN(
124119
?string $domain,
@@ -179,9 +174,6 @@ public function toUnicodeProvider(): iterable
179174

180175
/**
181176
* @dataProvider toAsciiProvider
182-
* @param ?string $domain
183-
* @param ?string $expectedDomain
184-
* @param ?string $expectedAsciiDomain
185177
*/
186178
public function testToAscii(
187179
?string $domain,
@@ -232,8 +224,6 @@ public function toAsciiProvider(): iterable
232224

233225
/**
234226
* @dataProvider withLabelWorksProvider
235-
*
236-
* @param ?string $expected
237227
*/
238228
public function testWithLabelWorks(DomainName $domain, int $key, string $label, ?string $expected): void
239229
{
@@ -374,7 +364,6 @@ public function validPrepend(): iterable
374364

375365
/**
376366
* @dataProvider withoutLabelWorksProvider
377-
* @param ?string $expected
378367
*/
379368
public function testwithoutLabelWorks(DomainName $domain, int $key, ?string $expected): void
380369
{
@@ -426,10 +415,6 @@ public function testwithoutLabelWorksWithMultipleKeys(): void
426415

427416
/**
428417
* @dataProvider resolveCustomIDNAOptionsProvider
429-
* @param ?string $expectedContent
430-
* @param ?string $expectedAscii
431-
* @param ?string $expectedUnicode
432-
* @param ?string $expectedWithLabel
433418
*/
434419
public function testResolveWorksWithCustomIDNAOptions(
435420
string $domainName,

src/ResolvedDomainTest.php

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ public function testRegistrableDomainIsNullWithFoundDomain(): void
3333

3434
/**
3535
* @dataProvider provideWrongConstructor
36-
* @param ?string $domain
3736
*/
3837
public function testItThrowsExceptionMisMatchPublicSuffixDomain(?string $domain, int $length): void
3938
{
@@ -71,7 +70,6 @@ public function testItCanBeUsedWithInternalPhpMethod(): void
7170

7271
/**
7372
* @dataProvider countableProvider
74-
* @param ?string $domain
7573
*/
7674
public function testItImplementsCountable(?string $domain, int $nbLabels): void
7775
{
@@ -93,12 +91,6 @@ public function countableProvider(): iterable
9391

9492
/**
9593
* @dataProvider toUnicodeProvider
96-
* @param ?string $domain
97-
* @param ?string $publicSuffix
98-
* @param ?string $expectedDomain
99-
* @param ?string $expectedSuffix
100-
* @param ?string $expectedIDNDomain
101-
* @param ?string $expectedIDNSuffix
10294
*/
10395
public function testItCanBeConvertedToUnicode(
10496
?string $domain,
@@ -185,12 +177,6 @@ public function toUnicodeProvider(): iterable
185177

186178
/**
187179
* @dataProvider toAsciiProvider
188-
* @param ?string $domain
189-
* @param ?string $publicSuffix
190-
* @param ?string $expectedDomain
191-
* @param ?string $expectedSuffix
192-
* @param ?string $expectedAsciiDomain
193-
* @param ?string $expectedAsciiSuffix
194180
*/
195181
public function testItCanBeConvertedToAscii(
196182
?string $domain,
@@ -261,10 +247,8 @@ public function toAsciiProvider(): iterable
261247

262248
/**
263249
* @dataProvider withSubDomainWorksProvider
264-
*
265-
* @param DomainName|string|null $subdomain the subdomain to add
266250
*/
267-
public function testItCanHaveItsSubDomainChanged(ResolvedDomain $domain, $subdomain, string $expected = null): void
251+
public function testItCanHaveItsSubDomainChanged(ResolvedDomain $domain, DomainName|string|null $subdomain, string $expected = null): void
268252
{
269253
$result = $domain->withSubDomain($subdomain);
270254

@@ -447,7 +431,6 @@ public function testItCanThrowsDuringSuffixChangesIfTheDomainHasNotSuffix(): voi
447431

448432
/**
449433
* @dataProvider resolveCustomIDNAOptionsProvider
450-
* @param ?string $expectedSubDomain
451434
*/
452435
public function testItCanWorksWithIDNAOptions(
453436
string $domainName,
@@ -514,11 +497,6 @@ public function resolveCustomIDNAOptionsProvider(): iterable
514497

515498
/**
516499
* @dataProvider withSldWorksProvider
517-
* @param ?string $host
518-
* @param ?string $publicSuffix
519-
* @param ?string $sld
520-
* @param ?string $expectedSld
521-
* @param ?string $expectedHost
522500
*/
523501
public function testWithSecondLevelDomain(
524502
?string $host,

src/RulesTest.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,6 @@ public function testWithDomainInterfaceObject(): void
205205

206206
/**
207207
* @dataProvider parseDataProvider
208-
* @param ?string $publicSuffix
209-
* @param ?string $registrableDomain
210-
* @param ?string $expectedDomain
211208
*/
212209
public function testGetRegistrableDomain(?string $publicSuffix, ?string $registrableDomain, string $domain, ?string $expectedDomain): void
213210
{
@@ -216,9 +213,6 @@ public function testGetRegistrableDomain(?string $publicSuffix, ?string $registr
216213

217214
/**
218215
* @dataProvider parseDataProvider
219-
* @param ?string $publicSuffix
220-
* @param ?string $registrableDomain
221-
* @param ?string $expectedDomain
222216
*/
223217
public function testGetPublicSuffix(?string $publicSuffix, ?string $registrableDomain, string $domain, ?string $expectedDomain): void
224218
{
@@ -227,9 +221,6 @@ public function testGetPublicSuffix(?string $publicSuffix, ?string $registrableD
227221

228222
/**
229223
* @dataProvider parseDataProvider
230-
* @param ?string $publicSuffix
231-
* @param ?string $registrableDomain
232-
* @param ?string $expectedDomain
233224
*/
234225
public function testGetDomain(?string $publicSuffix, ?string $registrableDomain, string $domain, ?string $expectedDomain): void
235226
{
@@ -406,8 +397,6 @@ public function invalidHostParseProvider(): iterable
406397
* @covers \Pdp\Domain::parseValue
407398
*
408399
* @dataProvider validPublicSectionProvider
409-
* @param ?string $domain
410-
* @param ?string $expected
411400
*/
412401
public function testPublicSuffixSection(?string $domain, ?string $expected): void
413402
{
@@ -444,8 +433,6 @@ public function validPublicSectionProvider(): iterable
444433
* on the domain name and checks the result is the public suffix expected."
445434
*
446435
* @see http://publicsuffix.org/list/
447-
* @param ?string $input
448-
* @param ?string $expected
449436
*/
450437
public function checkPublicSuffix(?string $input, ?string $expected): void
451438
{

src/Storage/TimeToLiveTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,9 @@ public function validDurationString(): iterable
4848
}
4949

5050
/**
51-
* @param int|string|Stringable|null|DateInterval $input
52-
* @param ?DateInterval $expected
5351
* @dataProvider validDurationInt
5452
*/
55-
public function testItCanBeInstantiatedFromSeconds($input, ?DateInterval $expected): void
53+
public function testItCanBeInstantiatedFromSeconds(int|string|Stringable|null|DateInterval $input, ?DateInterval $expected): void
5654
{
5755
self::assertEquals($expected, TimeToLive::convert($input));
5856
}

src/SuffixTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ public function testFromIANA(): void
106106

107107
/**
108108
* @dataProvider conversionReturnsTheSameInstanceProvider
109-
* @param ?string $publicSuffix
110109
*/
111110
public function testConversionReturnsTheSameInstance(?string $publicSuffix): void
112111
{

0 commit comments

Comments
 (0)