Pman.Gnumeric.js
[Pman.Core] / tests / Images.php
1 <?php
2
3 require_once 'Pman.php';
4
5 class Pman_Core_tests_Images extends Pman
6 {
7      function get($v, $opts=array()) {
8         // test...
9         echo '<PRE>';
10         require_once 'Pman/Core/Images.php';
11         //init();
12         
13         $d = DB_DataObject::factory('pressrelease_entry');
14         $d->get(2017);
15         
16         echo htmlspecialchars(Pman_Core_Images::replaceImageURLS($d->content));
17         
18         exit;
19         
20         
21         $ret = Pman_Core_Images::replaceImageURLS('
22                 <img src="http://www.roojs.com/index.php/Core/Images/Thumb/200x40/34/test.png">
23                 <img src="http://www.roojs.com/index.php/Images/34/test.png" width="100">
24                 <a href="http://www.roojs.com/index.php/Images/Download/34/test.png">test</a>
25                 
26         ', 'http://roojs.com/index.php/');
27         echo htmlspecialchars($ret);
28         
29      }
30      function output()
31      {
32         exit;
33      }
34 }