3 if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
4 print "This script must be run from the command line\n";
8 define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
9 define('STATUSNET', true);
11 require_once INSTALLDIR . '/lib/common.php';
13 $config['site']['server'] = 'example.net';
14 $config['site']['path'] = '/apps/statusnet';
16 class TagURITest extends PHPUnit_Framework_TestCase
19 * @dataProvider provider
21 public function testProduction($format, $args, $uri)
23 $minted = call_user_func_array(array('TagURI', 'mint'),
24 array_merge(array($format), $args));
26 $this->assertEquals($uri, $minted);
29 static public function provider()
31 return array(array('favorite:%d:%d',
33 'tag:example.net,'.date('Y-m-d').':apps:statusnet:favorite:1:3'));