← Back to team overview

anewt-developers team mailing list archive

[Branch ~uws/anewt/anewt.uws] Rev 1705: [textile] Fix textile test script that used obsolete API

 

------------------------------------------------------------
revno: 1705
committer: Wouter Bolsterlee <uws@xxxxxxxxx>
branch nick: anewt.uws
timestamp: Tue 2009-07-21 21:16:11 +0200
message:
  [textile] Fix textile test script that used obsolete API
modified:
  textile/textile.test.php

=== modified file 'textile/textile.test.php'
--- textile/textile.test.php	2008-10-30 17:24:19 +0000
+++ textile/textile.test.php	2009-07-21 19:16:11 +0000
@@ -1,8 +1,7 @@
 <?php
 
-error_reporting(E_ALL);
-
-require_once '../anewt.lib.php';
+error_reporting(E_ALL | E_STRICT);
+require_once dirname(__FILE__) . '/../anewt.lib.php';
 
 define('ANEWT_TEXTILE_DEVELOPMENT', 1);
 
@@ -17,16 +16,16 @@
 	header('Content-type: text/plain');
 	$p->set('content_type', 'text/plain');
 } else {
-	list ($base_url, $params) = URL::parse(Request::url());
-	$params['debug'] = true;
-	$debug_url = URL::unparse($base_url, $params);
+	list ($base_url, $params) = AnewtUrl::parse(Request::url());
+	$params['debug'] = '1';
+	$debug_url = AnewtUrl::build(array($base_url), $params);
 	$p->append(ax_p(ax_a_href('(Page source for debugging)', $debug_url)));
 }
 
 anewt_include('textformatting');
 anewt_include('textile');
 
-$text = file_get_contents('sample-text.txt');
+$text = file_get_contents(dirname(__FILE__) . '/sample-text.txt');
 $formatted_text = TextFormatter::format($text, 'textile');
 
 $p->append(ax_raw($formatted_text));



--
lp:anewt
https://code.launchpad.net/~uws/anewt/anewt.uws

Your team Anewt developers is subscribed to branch lp:anewt.
To unsubscribe from this branch go to https://code.launchpad.net/~uws/anewt/anewt.uws/+edit-subscription.