aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/UtilsTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/UtilsTest.php')
-rw-r--r--tests/UtilsTest.php37
1 files changed, 0 insertions, 37 deletions
diff --git a/tests/UtilsTest.php b/tests/UtilsTest.php
index 3073b5eb..6a7870c4 100644
--- a/tests/UtilsTest.php
+++ b/tests/UtilsTest.php
@@ -253,41 +253,4 @@ class UtilsTest extends PHPUnit_Framework_TestCase
253 is_session_id_valid('c0ZqcWF3VFE2NmJBdm1HMVQ0ZHJ3UmZPbTFsNGhkNHI=') 253 is_session_id_valid('c0ZqcWF3VFE2NmJBdm1HMVQ0ZHJ3UmZPbTFsNGhkNHI=')
254 ); 254 );
255 } 255 }
256
257 /**
258 * Test text2clickable without a redirector being set.
259 */
260 public function testText2clickableWithoutRedirector()
261 {
262 $text = 'stuff http://hello.there/is=someone#here otherstuff';
263 $expectedText = 'stuff <a href="http://hello.there/is=someone#here">http://hello.there/is=someone#here</a> otherstuff';
264 $processedText = text2clickable($text, '');
265 $this->assertEquals($expectedText, $processedText);
266 }
267
268 /**
269 * Test text2clickable a redirector set.
270 */
271 public function testText2clickableWithRedirector()
272 {
273 $text = 'stuff http://hello.there/is=someone#here otherstuff';
274 $redirector = 'http://redirector.to';
275 $expectedText = 'stuff <a href="'.
276 $redirector .
277 urlencode('http://hello.there/is=someone#here') .
278 '">http://hello.there/is=someone#here</a> otherstuff';
279 $processedText = text2clickable($text, $redirector);
280 $this->assertEquals($expectedText, $processedText);
281 }
282
283 /**
284 * Test testSpace2nbsp.
285 */
286 public function testSpace2nbsp()
287 {
288 $text = ' Are you thrilled by flags ?'. PHP_EOL .' Really?';
289 $expectedText = '&nbsp; Are you &nbsp; thrilled &nbsp;by flags &nbsp; ?'. PHP_EOL .'&nbsp;Really?';
290 $processedText = space2nbsp($text);
291 $this->assertEquals($expectedText, $processedText);
292 }
293} 256}