#!/usr/bin/env php gen(5); zenData('entry')->gen(10); su('admin'); $entry = new entryModelTest(); r($entry->saveLogTest(1, 'http://example.com/api/test')) && p('objectID,objectType,url') && e('1,entry,http://example.com/api/test'); r($entry->saveLogTest(2, 'http://test.com/api?param=测试&type=中文')) && p('objectID,objectType,url') && e('2,entry,http://test.com/api?param=测试&type=中文'); $longUrl = 'http://example.com/very/long/path/with/many/segments/and/parameters?param1=value1¶m2=value2¶m3=value3¶m4=value4¶m5=value5'; r($entry->saveLogTest(3, $longUrl)) && p('objectID,objectType,url') && e('3,entry,http://example.com/very/long/path/with/many/segments/and/parameters?param1=value1¶m2=value2¶m3=value3¶m4=value4¶m5=value5'); r($entry->saveLogTest(4, '')) && p('objectID,objectType,url') && e('4,entry,~~'); r($entry->saveLogTest(999, 'http://test.com/nonexistent')) && p('objectID,objectType,url') && e('999,entry,http://test.com/nonexistent');