Skip to content

Commit

Permalink
Remove calls to getMockForAbstractClass()
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-daubois committed May 15, 2024
1 parent f3e591c commit 58b1658
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tests/Question/QuestionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,15 @@ public function testSetAutocompleterValuesInvalid($values)
public function testSetAutocompleterValuesWithTraversable()
{
$question1 = new Question('Test question 1');
$iterator1 = $this->getMockForAbstractClass(\IteratorAggregate::class);
$iterator1 = $this->createMock(\IteratorAggregate::class);
$iterator1
->expects($this->once())
->method('getIterator')
->willReturn(new \ArrayIterator(['Potato']));
$question1->setAutocompleterValues($iterator1);

$question2 = new Question('Test question 2');
$iterator2 = $this->getMockForAbstractClass(\IteratorAggregate::class);
$iterator2 = $this->createMock(\IteratorAggregate::class);
$iterator2
->expects($this->once())
->method('getIterator')
Expand Down

0 comments on commit 58b1658

Please sign in to comment.