mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MNT Fix test
This commit is contained in:
parent
a76fa32a39
commit
d9be52579d
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace SilverStripe\ORM\Tests;
|
namespace SilverStripe\ORM\Tests;
|
||||||
|
|
||||||
|
use ArrayIterator;
|
||||||
use LogicException;
|
use LogicException;
|
||||||
use PHPUnit\Framework\MockObject\MockObject;
|
use PHPUnit\Framework\MockObject\MockObject;
|
||||||
use SilverStripe\Dev\SapphireTest;
|
use SilverStripe\Dev\SapphireTest;
|
||||||
@ -34,8 +35,9 @@ class ListDecoratorTest extends SapphireTest
|
|||||||
|
|
||||||
public function testGetIterator()
|
public function testGetIterator()
|
||||||
{
|
{
|
||||||
$this->list->expects($this->once())->method('getIterator')->willReturn('mock');
|
$iterator = new ArrayIterator();
|
||||||
$this->assertSame('mock', $this->decorator->getIterator());
|
$this->list->expects($this->once())->method('getIterator')->willReturn($iterator);
|
||||||
|
$this->assertSame($iterator, $this->decorator->getIterator());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testCanSortBy()
|
public function testCanSortBy()
|
||||||
|
Loading…
Reference in New Issue
Block a user