X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tests%2FCommandInterperterTest.php;h=5f681ae1dac82b24ad522c6c8d7004cfce5defc2;hb=a59c439b467b0dd307bf0d84e3d21f7b4c2d9c38;hp=3ce1cc28211cdedb1a0a3cf5d928d8e1d62242a4;hpb=27ef3b1d905cdf8f47b47293a757624dda88fdc7;p=quix0rs-gnu-social.git diff --git a/tests/CommandInterperterTest.php b/tests/CommandInterperterTest.php index 3ce1cc2821..5f681ae1da 100644 --- a/tests/CommandInterperterTest.php +++ b/tests/CommandInterperterTest.php @@ -6,8 +6,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { } define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); -define('STATUSNET', true); -define('LACONICA', true); +define('GNUSOCIAL', true); +define('STATUSNET', true); // compatibility require_once INSTALLDIR . '/lib/common.php'; @@ -21,10 +21,7 @@ class CommandInterpreterTest extends PHPUnit_Framework_TestCase { $inter = new CommandInterpreter(); - $user = new User(); // fake user - $user->limit(1); - $user->find(); - $cmd = $inter->handle_command($user, $input); + $cmd = $inter->handle_command(null, $input); $type = $cmd ? get_class($cmd) : null; $this->assertEquals(strtolower($expectedType), strtolower($type), $comment); @@ -133,9 +130,9 @@ class CommandInterpreterTest extends PHPUnit_Framework_TestCase array('whois foo', 'WhoisCommand'), array('whois foo bar', null), - array('fav', null), +/* array('fav', null), array('fav foo', 'FavCommand'), - array('fav foo bar', null), + array('fav foo bar', null),*/ array('nudge', null), array('nudge foo', 'NudgeCommand'), @@ -149,21 +146,21 @@ class CommandInterpreterTest extends PHPUnit_Framework_TestCase array('invite foo bar', null), array('track', null), - array('track foo', 'TrackCommand'), - array('track off', 'TrackOffCommand'), + array('track foo', 'SearchSubTrackCommand'), + array('track off', 'SearchSubTrackOffCommand'), array('track foo bar', null), array('track off foo', null), array('untrack', null), - array('untrack foo', 'UntrackCommand'), - array('untrack all', 'TrackOffCommand'), + array('untrack foo', 'SearchSubUntrackCommand'), + array('untrack all', 'SearchSubTrackOffCommand'), array('untrack foo bar', null), array('untrack all foo', null), - array('tracking', 'TrackingCommand'), + array('tracking', 'SearchSubTrackingCommand'), array('tracking foo', null), - array('tracks', 'TrackingCommand'), + array('tracks', 'SearchSubTrackingCommand'), array('tracks foo', null), );