From 08852f1d61785e3f7d421891c0e98ff73f862996 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 28 Jul 2018 09:30:37 -0700 Subject: [PATCH] basic thumbUrl test. --- tests/unit/e_parseTest.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tests/unit/e_parseTest.php b/tests/unit/e_parseTest.php index 0bf777e69..338dab506 100644 --- a/tests/unit/e_parseTest.php +++ b/tests/unit/e_parseTest.php @@ -227,12 +227,26 @@ TMP; { } - +*/ public function testThumbUrl() { + $urls = array( + array('path' => '{e_PLUGIN}gallery/images/butterfly.jpg', 'expected'=>'/thumb.php?src=e_PLUGIN%2Fgallery%2Fimages%2Fbutterfly.jpg&w=300&h=200'), + array('path' => '{e_PLUGIN}dummy/Freesample.svg', 'expected'=>'/e107_plugins/dummy/Freesample.svg'), + ); + + foreach($urls as $val) + { + + $actual = $this->tp->thumbUrl($val['path'], array('w'=>300, 'h'=>200)); + + $this->assertContains($val['expected'], $actual); + //echo $$actual."\n\n"; + } + } - +/* public function testParseBBCodes() {