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('GNUSOCIAL', true);
10 define('STATUSNET', true); // compatibility
12 require_once INSTALLDIR . '/lib/common.php';
14 $config['site']['server'] = 'example.net';
15 $config['site']['path'] = '/apps/statusnet';
17 class TagURITest extends PHPUnit_Framework_TestCase
20 * @dataProvider provider
22 public function testProduction($format, $args, $uri)
24 $minted = call_user_func_array(array('TagURI', 'mint'),
25 array_merge(array($format), $args));
27 $this->assertEquals($uri, $minted);
30 static public function provider()
32 return array(array('favorite:%d:%d',
34 'tag:example.net,'.date('Y-m-d').':apps:statusnet:favorite:1:3'));