Skip to content

Commit a42536d

Browse files
Reorder
1 parent 215a205 commit a42536d

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

src/Metadata/MetadataCollection.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,16 @@ public function isIgnorePhpunitDeprecations(): self
361361
);
362362
}
363363

364+
public function isIgnorePhpunitWarnings(): self
365+
{
366+
return new self(
367+
...array_filter(
368+
$this->metadata,
369+
static fn (Metadata $metadata): bool => $metadata->isIgnorePhpunitWarnings(),
370+
),
371+
);
372+
}
373+
364374
public function isRunClassInSeparateProcess(): self
365375
{
366376
return new self(
@@ -650,14 +660,4 @@ public function isWithoutErrorHandler(): self
650660
),
651661
);
652662
}
653-
654-
public function isIgnorePhpunitWarnings(): self
655-
{
656-
return new self(
657-
...array_filter(
658-
$this->metadata,
659-
static fn (Metadata $metadata): bool => $metadata->isIgnorePhpunitWarnings(),
660-
),
661-
);
662-
}
663663
}

tests/unit/Metadata/MetadataCollectionTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,14 @@ public function test_Can_be_filtered_for_IgnorePhpunitDeprecations(): void
331331
$this->assertTrue($collection->asArray()[0]->isIgnorePhpunitDeprecations());
332332
}
333333

334+
public function test_Can_be_filtered_for_IgnorePhpunitWarnings(): void
335+
{
336+
$collection = $this->collectionWithOneOfEach()->isIgnorePhpunitWarnings();
337+
338+
$this->assertCount(1, $collection);
339+
$this->assertTrue($collection->asArray()[0]->isIgnorePhpunitWarnings());
340+
}
341+
334342
public function test_Can_be_filtered_for_PostCondition(): void
335343
{
336344
$collection = $this->collectionWithOneOfEach()->isPostCondition();
@@ -563,14 +571,6 @@ public function test_Can_be_filtered_for_WithoutErrorHandler(): void
563571
$this->assertTrue($collection->asArray()[0]->isWithoutErrorHandler());
564572
}
565573

566-
public function test_Can_be_filtered_for_IgnorePhpunitWarnings(): void
567-
{
568-
$collection = $this->collectionWithOneOfEach()->isIgnorePhpunitWarnings();
569-
570-
$this->assertCount(1, $collection);
571-
$this->assertTrue($collection->asArray()[0]->isIgnorePhpunitWarnings());
572-
}
573-
574574
private function collectionWithOneOfEach(): MetadataCollection
575575
{
576576
return MetadataCollection::fromArray(
@@ -599,6 +599,7 @@ private function collectionWithOneOfEach(): MetadataCollection
599599
Metadata::groupOnClass(''),
600600
Metadata::ignoreDeprecationsOnClass(),
601601
Metadata::ignorePhpunitDeprecationsOnClass(),
602+
Metadata::ignorePhpunitWarnings(null),
602603
Metadata::postCondition(0),
603604
Metadata::preCondition(0),
604605
Metadata::preserveGlobalStateOnClass(true),
@@ -638,7 +639,6 @@ private function collectionWithOneOfEach(): MetadataCollection
638639
Metadata::usesMethod('', ''),
639640
Metadata::withEnvironmentVariableOnClass('foo', 'bar'),
640641
Metadata::withoutErrorHandler(),
641-
Metadata::ignorePhpunitWarnings(null),
642642
],
643643
);
644644
}

0 commit comments

Comments
 (0)