Commit Graph

285 Commits

Author SHA1 Message Date
Brion Vibber 247a494006 AtomPub tests: fix delete test 2010-12-14 13:25:22 -08:00
Brion Vibber 0bfeaa4559 AtomPub tests: fix for atom post check 2010-12-14 13:23:09 -08:00
Brion Vibber 0f26d6eb70 more fixins on AtomPub tests 2010-12-14 13:11:34 -08:00
Brion Vibber 56e72ec7a1 auth fix 2010-12-14 12:36:21 -08:00
Brion Vibber 3426f65736 Mostly-implemented basic AtomPub tests 2010-12-14 12:33:28 -08:00
Brion Vibber 654d1749da partial stub file for atompub tests 2010-12-13 17:48:23 -08:00
Brion Vibber 82799f675f Add Nickname test cases for @-reply regexes in common_find_mentions 2010-11-29 15:07:55 -08:00
Brion Vibber fffc10a230 Nickname class to encapsulate validation & common regexes for nickname formats.
This provides initial infrastructure for decoupling display names from internal canonical names, but continues to have us storing and using the canonical forms.

It should be/become possible to provide mixed-case and underscore-containing names in links, @-mention, !-group, etc, but we don't store those alternate forms generally.
2010-11-29 14:46:10 -08:00
Brion Vibber dc350b5463 Work in progress on nickname validation changes. lib/nickname.php appears to have been destroyed by NetBeans and will be rewritten shortly. Sigh. 2010-11-29 14:15:25 -08:00
Brion Vibber b7e0078d10 Start on some nickname-validation test cases: several of these fail right now because we had regressions in 0.8 or 0.9 where we lost normalization of uppercase and some other chars. 2010-11-29 11:31:33 -08:00
Brion Vibber 0735ca86d2 Add some data integrity checks on oembed tests (shows a bug on identi.ca test case -- missing width/height in photo data) 2010-11-15 12:58:00 -08:00
Brion Vibber 727596f35d Test oEmbed lookups with oohembed both on and off explicitly 2010-11-15 12:32:29 -08:00
Brion Vibber 68ff57f230 Restructure oembed test sources 2010-11-15 12:25:44 -08:00
Brion Vibber 87114a5c30 Add some basic oEmbed lookup test cases; fixed a bug in discovery fallback. 2010-11-15 11:55:28 -08:00
Brion Vibber e611ec5dee Fix option settings on oauth_post_notice.php 2010-10-20 16:16:00 -07:00
Brion Vibber 9d401e2b15 Fix --oauth-token-secret on oauth_verify_creds.php 2010-10-20 15:17:56 -07:00
Brion Vibber 067d37f864 Update URLDetectionTest.php for rel="nofollow external". There are still some broken tests due to bad quote splitting, which is unrelated. 2010-10-18 12:26:01 -07:00
Zach Copley 2291d68e70 Default to ssl in oauth tests examples config 2010-10-12 17:54:54 -07:00
Zach Copley baa8ae778a Update OAuth test script README 2010-10-07 19:46:46 -07:00
Zach Copley 590d96f70e Rename oauth.ini example to oauth.ini.sample 2010-10-07 19:43:55 -07:00
Zach Copley 626f306600 Rename OAuth status update script 2010-10-07 19:41:05 -07:00
Zach Copley 3e0a1e3b88 Some fixups 2010-10-07 19:40:31 -07:00
Zach Copley be1668a1bd Renamed the OAuth verify credentials test script 2010-10-07 19:24:24 -07:00
Zach Copley 474834a332 Some fixups to this the OAuth verify credentials test script 2010-10-07 19:23:43 -07:00
Zach Copley 46de847ce0 Rename OAuth token credential fetching script 2010-10-07 18:41:34 -07:00
Zach Copley 70cad11573 Update access token fetching test script to 1.0a 2010-10-07 18:33:14 -07:00
Zach Copley b8f2cc4e6f Make the verifier pin display a little nicer 2010-10-07 13:51:47 -07:00
Zach Copley 82a0a1a74b More OAuthy name for temp credentials fetching test script 2010-10-07 12:01:00 -07:00
Zach Copley 9d5224e2b4 Change temp credential test script to use POST instead of GET (more
useful for testing in general)
2010-10-07 11:56:49 -07:00
Zach Copley 5d5c4e8344 Some more cleanup 2010-10-06 19:05:31 -07:00
Zach Copley 73a73c9362 - Update getrequesttoken test script to use 1.0a
- Some cleanup
2010-10-06 13:40:02 -07:00
Zach Copley 3053770078 A bit more work on the request token fetching test script 2010-10-06 13:40:01 -07:00
Zach Copley 82f05d0a61 Somewhat improved test script for fetching an OAuth request token 2010-10-06 13:40:00 -07:00
Evan Prodromou b17fc0ca5b update tests to include 'mentioned' links 2010-08-03 16:04:19 -07:00
Evan Prodromou 744233c6dc add actor info to tests 2010-08-03 15:49:49 -07:00
Evan Prodromou 8d19162122 more tests for activity generation 2010-08-03 15:26:19 -07:00
Evan Prodromou 6756a752c4 add some more tests for replies and group posts 2010-08-03 14:17:36 -07:00
Evan Prodromou 1a6148f0e4 initial unit tests for activity generation 2010-08-03 13:41:44 -07:00
Brion Vibber 9c7b66984c Enhanced upload file type detection. If given an original filename, we'll attempt to detect type from the extension if we were unable to make a definitive match from content. Generic octet-stream, zip, and MS Office type are explicitly singled out for re-checks, which fixes OpenOffice and MS Office documents to come up with the proper types when misdetected.
File extensions can also be added to the upload type whitelist; they'll be normalized to types for the actual comparison, so only known extensions will work.
2010-06-28 08:59:47 -07:00
Brion Vibber 41d81b996f Test cases for MediaFile::getUploadedFileType() with OpenOffice, MS Office, and PDF sample files (as saved from OpenOffice 3.2)
Only 3 of 16 cases pass on my dev box with default config. Ouch!
2010-06-28 08:59:46 -07:00
Brion Vibber 50d5f5e04c Merge branch 'master' into testing 2010-04-29 15:12:02 -07:00
Brion Vibber 8fd0059bf6 Test cases and fixes for Atom and RSS content decoding.
Fix extraction of Atom <content type="text"> and <content type="html">; we were failing to escape plaintext source data to HTML, and doing an extraneous double-deescape on HTML source resulting in breakage of notices containing text that looks like HTML. Only <content type="xhtml"> was working correctly previously.
Fixes for RSS2 content processing: we were failing to load <content:encoded> at all due to using wrong element name, and were applying an extraneous de-escape for <description> rather than the escaping that is required to turn plaintext into HTML. (Per spec, <description> must be plaintext.)
2010-04-23 15:40:48 -07:00
Brion Vibber 0841fa712e Ticket #1281: JID validation now more or less follows spec instead of calling e-mail validator
Basic splitting/validation code submitted via http://status.net/wiki/XMPP/JID_validation -- Copyright 2009 Patrick Georgi <patrick@georgi-clan.de> Licensed under ISC-L, which is compatible with everything else that keeps the copyright notice intact.

Added PEAR Net_IDNA package to extlib to handle IDN normalization (also used by Validate's email verifier if present).

* added test suite, supplemented my own test cases with JID validation and normalization test cases from libpurple
* follows XMPP rules for validation of name part
* fixes for normalization with non-ASCII names
* will do domain checks if $config['email']['check_domain'] is on, checking for an XMPP-server SRV record or any lookup. (We don't actually need to ping those direct though.)
* some more obscure stringprep validation rules aren't quite followed yet, but we err on the side of permissiveness.
* we still don't actually let you save your address with a resource on it, as we strip resources when looking up users who've sent us presence or message updates. I would recommend saving the outgoing resource as a separate field if/when we add that..?
2010-03-30 17:35:27 -07:00
Evan Prodromou 8a9e664014 reverse order of activity parse test arguments 2010-03-27 22:43:18 -04:00
Zach Copley b8e97ac709 Some initial media parsing
- Activity now returns a list of activity objects
- Processing of photo objects
2010-03-22 18:55:17 -07:00
Zach Copley a0a9acb9a2 Fix broken assertion 2010-03-21 18:47:43 -07:00
Evan Prodromou e497ddc81f test posterous author use 2010-03-20 16:53:47 -05:00
Evan Prodromou 05e3768e6a Parse RSS items as activities
First steps to parsing RSS items as activities. RSS feeds don't seem
to have enough data to make good remote profiles, but this may work
with some "hints".
2010-03-19 09:48:39 -05:00
Zach Copley 0e360ad23d Test a small user feed to ensure we're taking the activity actor from the subject 2010-03-03 20:58:34 -08:00
Zach Copley 8274bbedcf Fix test to account for new way avatars are stored in ActivityObject 2010-02-25 19:17:50 -08:00
Zach Copley 543ff40ef6 Populate more profile information when doing a remote subscribe 2010-02-24 16:51:24 -08:00
Zach Copley 618ce6a855 - Move ActivityParseTests to core
- Add test for Portable Contacts stuff
2010-02-23 23:58:21 -08:00
Evan Prodromou 61a072b3c4 Add a library to mint tag URIs
We've been making pretty crummy tag: URIs for a while. We should
continue to favor HTTP URIs, since it's nice to be able to discover
things about an object you've shared the ID of. Where that's not
possible, this makes nicer tag URIs.
2010-02-20 13:23:08 -05:00
Zach Copley 54d04a0c91 Test script to update your status via OAuth 2010-01-27 09:59:40 +00:00
Zach Copley c2c930a855 Fixed some spelling mistakes in the README 2010-01-24 16:36:05 -08:00
Zach Copley de70b91a3a Some rough test scripts for poking at the OAuth system 2010-01-24 16:36:05 -08:00
Brion Vibber a998bda4a5 Fix UserRightsTest unit tests 2009-12-16 09:27:48 -05:00
Brion Vibber 0158f4f73d PHP 5.3 closure-based implementation of curry(); old implementation used as fallback for older PHP versions. Added unit tests to confirm they both work! 2009-12-16 09:27:48 -05:00
Brion Vibber 88ff0eefb4 Renaming GeonamesPlugin::NAMESPACE to GeonamesPlugin::LOCATION_NS to avoid parse errors; 'namespace' is a reserved keyword in PHP 5.3 and later. 2009-11-17 16:56:43 -08:00
Craig Andrews 87484424a5 fix the [] unit tests 2009-11-02 12:53:02 -05:00
Evan Prodromou 3c724ccd0d Merge branch '0.9.x' into location 2009-10-24 19:59:46 -04:00
Brion Vibber ff4f9d8c7d Fix an incorrectly passing URL test case and add two a related test case:
URLs with paths followed by a double-quote character are incorrectly including the quote in the URL. The double-quote character is in fact not a legal URL char and must be URL-escaped; more importantly it just causes oddities when you quote a message ending in a URL -- such as when using the redent-button experimental feature.
2009-10-23 13:50:39 -07:00
Evan Prodromou 8828bc485f beginning of a test for location services 2009-10-22 16:19:25 -04:00
Evan Prodromou 3afcdc18f7 Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x 2009-09-27 21:15:14 -04:00
Evan Prodromou 6c069312e2 user rights 2009-09-27 21:11:45 -04:00
Craig Andrews fc2426d7ce Fix some bugs in the URL linkification, and fixed the unit test. 2009-09-27 16:52:15 -04:00
Brion Vibber 3ff8514f5e Fix URL linkification test cases for addition of 'title' attribution with long URL in f3c8fccc
After removing 103 false positives, this leaves 4 actually broken tests, showing two failure modes for mail links:
* 'mail without mailto' formatting shortcut in common_linkify didn't get the 'title' attribute added with the other URLs
* links including mailto: protocol are being incorrectly expanded to http: protocol in the long URL
2009-09-27 12:54:38 -04:00
Craig Andrews 292bb7c4d8 Allow @ signs in the path, querystring, and fragment parts of URLs 2009-09-10 21:19:38 -04:00
Craig Andrews aecdba1ded :: isn't a valid IPv6 address for our purposes 2009-09-09 16:57:11 -04:00
Craig Andrews 80b7e54ca2 Added additional characters as allowed in URLs. 2009-09-04 11:30:29 -04:00
Craig Andrews 20423af689 Allow :'s in the path, query string, and fragment parts of the url (Mediawiki URLs often do this) 2009-08-31 10:33:37 -04:00
Craig Andrews 3368452ebf Add % and ~ as valid characters in the path, querystring, and fragment parts of URLs 2009-08-28 16:18:45 -04:00
Evan Prodromou bbb830e14c Merge branch '0.8.x' of git@gitorious.org:laconica/mainline into 0.8.x 2009-08-27 14:18:51 -07:00
Evan Prodromou 865b716f09 change LACONICA to STATUSNET 2009-08-25 18:42:34 -04:00
Brenda Wallace 6c3149334c Merge commit 'mainline-write/0.8.x' into 0.8.x 2009-08-26 10:02:07 +12:00
Brenda Wallace 3400f6f431 renamed to plural, for consitency 2009-08-26 10:00:29 +12:00
Craig Andrews a2117961be Allow ({['" to preceded #tags 2009-08-25 17:54:08 -04:00
Craig Andrews 8cd474e985 Correct the hash tag test 2009-08-25 16:06:04 -04:00
Craig Andrews 210bc4248b All tests pass except for those that require matching parens or brackets 2009-08-25 14:12:31 -04:00
Craig Andrews 6a3a25b5a2 Improved the URL tests, and improve the matcher so more tests are passed. The remaining failing tests I believe are incorrect. 2009-08-25 11:21:45 -04:00
Brenda Wallace 9ec3911020 Merge commit 'mainline/0.8.x' into 0.8.x 2009-08-25 19:01:29 +12:00
Brenda Wallace 3ff67b3bc1 beginning of hashtag tests 2009-08-25 18:44:32 +12:00
Craig Andrews 9fd3a41576 ftps protocol should be handled the same way as ftp
Canon urls that have a protocol followed by a host (and no path) automatcally get a trailing slash by the canon function - make the unit test match that
2009-08-24 20:44:06 -04:00
Evan Prodromou add42759c9 change class to rel in unit tests for URL check 2009-08-24 17:48:24 -04:00
Evan Prodromou f3cdc7f272 Add unit test directory and first test 2009-08-24 15:46:12 -04:00