Skip to content

Commit

Permalink
Improve stability of Tracker\RequestSetTest (#22200)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl authored May 10, 2024
1 parent c48b2ab commit cc85b43
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions tests/PHPUnit/Unit/Tracker/RequestSetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,22 @@ public function testSetRequestsShouldConvertNonRequestInstancesToARequestInstanc

public function testSetRequestsShouldIgnoreEmptyRequestsButNotArrays()
{
$requests = array(
$this->buildRequest(5),
$request1 = $this->buildRequest(5);
$request2 = $this->buildRequest(2);
$request3 = $this->buildRequest(6);

$requests = [
$request1,
null,
$this->buildRequest(2),
$request2,
0,
$this->buildRequest(6),
array()
);
$request3,
[]
];

$this->requestSet->setRequests($requests);

$expected = array($this->buildRequest(5), $this->buildRequest(2), $this->buildRequest(6), new Request(array()));
$expected = [$request1, $request2, $request3, new Request([])];
$this->assertEquals($expected, $this->requestSet->getRequests());
}

Expand Down

0 comments on commit cc85b43

Please sign in to comment.