ImboIntegrationTest\Database\DatabaseTests::testGetImagesWithPageAndLimit PHP Метод

testGetImagesWithPageAndLimit() публичный Метод

public testGetImagesWithPageAndLimit ( $page = null, $limit = null, array $imageIdentifiers )
$imageIdentifiers array
    public function testGetImagesWithPageAndLimit($page = null, $limit = null, array $imageIdentifiers)
    {
        $this->insertImages();
        // Test page and limit
        $query = new Query();
        if ($page !== null) {
            $query->page($page);
        }
        if ($limit !== null) {
            $query->limit($limit);
        }
        $model = $this->getMock('Imbo\\Model\\Images');
        $model->expects($this->once())->method('setHits')->with(6);
        $images = $this->adapter->getImages(['user'], $query, $model);
        $this->assertCount(count($imageIdentifiers), $images);
        foreach ($images as $i => $image) {
            $this->assertSame($imageIdentifiers[$i], $image['imageIdentifier']);
        }
    }