You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -26,14 +32,22 @@ public function testGetSetOperator()
26
32
$this->assertInstanceOf(\InvalidArgumentException::class, $e, '->setOperator() throws an \InvalidArgumentException if the operator is not valid.');
27
33
}
28
34
29
-
$comparator = newComparator();
35
+
$comparator = newComparator('some target');
36
+
37
+
$this->expectDeprecation('Since symfony/finder 5.4: "Symfony\Component\Finder\Comparator\Comparator::setOperator" is deprecated. Set the operator via the constructor instead.');
30
38
$comparator->setOperator('>');
31
39
$this->assertEquals('>', $comparator->getOperator(), '->getOperator() returns the current operator');
32
40
}
33
41
42
+
/**
43
+
* @group legacy
44
+
*/
34
45
publicfunctiontestGetSetTarget()
35
46
{
47
+
$this->expectDeprecation('Since symfony/finder 5.4: Constructing a "Symfony\Component\Finder\Comparator\Comparator" without setting "$target" is deprecated.');
36
48
$comparator = newComparator();
49
+
50
+
$this->expectDeprecation('Since symfony/finder 5.4: "Symfony\Component\Finder\Comparator\Comparator::setTarget" is deprecated. Set the target via the constructor instead.');
37
51
$comparator->setTarget(8);
38
52
$this->assertEquals(8, $comparator->getTarget(), '->getTarget() returns the target');
39
53
}
@@ -43,9 +57,10 @@ public function testGetSetTarget()
0 commit comments