1<?php
2/**
3 * @group plugin_pageimage
4 * @group plugins
5 */
6class helper_plugin_pageimage_pagelist_test extends DokuwikiTest {
7    protected $pluginsEnabled = array('pageimage');
8
9    private $helper;
10    public function setUp(){
11        parent::setUp();
12        $this->helper = plugin_load('helper', 'pageimage');
13    }
14
15    public function test_imageSet_imagemissing() {
16        saveWikiText('pageimage:page','~~PAGEIMAGE:pageimage:png~~','Test setup');
17
18        $image = $this->helper->td('pageimage:page');
19        $this->assertEquals('',$image);
20    }
21
22    public function test_imageSet_imageexists() {
23        saveWikiText('pageimage:page','~~PAGEIMAGE:wiki:dokuwiki-128.png~~','Test setup');
24
25        $image = $this->helper->td('pageimage:page');
26        //$this->assertContains('h=70',$image);
27        $this->assertContains('media=wiki:dokuwiki-128.png',$image);
28    }
29
30}