Skip to content

Commit

Permalink
MNT Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Aug 11, 2022
1 parent 2cd2dd1 commit 52c68fb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/php/ORM/ListDecoratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace SilverStripe\ORM\Tests;

use ArrayIterator;
use LogicException;
use PHPUnit\Framework\MockObject\MockObject;
use SilverStripe\Dev\SapphireTest;
Expand Down Expand Up @@ -34,8 +35,9 @@ protected function setUp(): void

public function testGetIterator()
{
$this->list->expects($this->once())->method('getIterator')->willReturn('mock');
$this->assertSame('mock', $this->decorator->getIterator());
$iterator = new ArrayIterator();
$this->list->expects($this->once())->method('getIterator')->willReturn($iterator);
$this->assertSame($iterator, $this->decorator->getIterator());
}

public function testCanSortBy()
Expand Down

0 comments on commit 52c68fb

Please sign in to comment.