1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-23 17:12:41 +00:00
Commit graph

67 commits

Author SHA1 Message Date
J. King
aa57227097 Use PSR-7 for authentication; fixes #53 2018-01-11 15:48:29 -05:00
J. King
daea0ceb27 Make HTTP message testing generic
assertMessage will test the method and target URL of requests, attributes of server requests, as well as the existing testing of a response's status code. All messages' bodies and header fields are tested for equivalence (with a special case for JSON response bodies).
2018-01-11 11:09:25 -05:00
J. King
90dfeb727a Implement CORS; fixes #126 2018-01-09 12:31:40 -05:00
J. King
3fa2d38f31 Initial rewrite of REST class; needs more testing, but should be functional
- improves #53
- improves #66
2018-01-06 12:02:45 -05:00
J. King
890f9b07d4 Replace Resquest objects with PSR-7 request messages; improves #53 2018-01-04 23:08:53 -05:00
J. King
9eadd602bd Replace Response objects with PSR-7 response messages; improves #53
While the test suite passes, this commit yields a broken server: replacing ad hoc request objectss with PSR-7 ones is still required, as is emission of PSR-7 responses. Both will come in subsequent commits, with tests

Diactoros was chosen specifically because it includes facilities for emitting responses, something which is awkward to test. The end of this refactoring should see both the Response and Request classes disappear, and the general REST class fully covered (as well as any speculative additions to AbstractHanlder).
2018-01-03 23:13:08 -05:00
J. King
4bada691e9 PDO tests and fixes; improves #72 2017-12-19 19:08:08 -05:00
J. King
3f65625090 Ensure tests do not rely in UTC default timezone
Six tests failed if the default timezone was not UTC. These were all due to faulty expectations, however, not faulty output.
2017-12-16 18:30:45 -05:00
J. King
3e42fbdddf Munge off-by-one dates in tests; fixes #112 2017-12-08 16:00:23 -05:00
J. King
11b2066922 Added per-file legal boilerplate
Includes PHPDoc license tag in the file-level block with accompanying copyright notice.

Also added an AUTHORS file on the off chance of outside contributions
2017-11-16 20:23:18 -05:00
J. King
d365529493 Multiple fixes to input sanitization
- Database functions now accept any input, but throw typeViolation exceptions where appropriate instead of idMissing or subjectMissing
- Added unit tests for the new Misc\ValueInfo static class
- Added ValueInfo::id() method to centrally validate database IDs, and made use of it consistently
- Made use of PHP's filter_var() function where appropriate when validating or sanitizing input
- Made the NCN protocol handler reject most invalid IDs before handing off to method handlers
- Made NCN's feedUpdate and subscriptionMove methods return 422 on invalid input
- Adjusted several tests to handler type violations
2017-09-27 22:25:45 -04:00
J. King
f7e50fe95d Passed code through linter 2017-08-29 10:50:31 -04:00
J. King
cbdcacd1c3 Added basic code coverage annotations 2017-07-20 18:36:03 -04:00
J. King
da092d5f8c Changed Misc\DateFormatter to a collection of static methods and renamed it to Date; renamed Data to Arsse to avoid confusion and better reflect its centrality 2017-07-17 07:47:57 -04:00
J. King
ac73ed0e7f More tweaks
- Changed Data::$l to Data::$lang; it's not used enough to justify the possibly confusing shortening
- Made database auto-update a general rather than per-driver setting
- Added settings for forthcoming feed fetching service
2017-07-11 20:27:37 -04:00
J. King
eacada3982 Fix ISO 8601 format strings 2017-07-09 18:31:03 -04:00
J. King
b3f631e335 Use more reliable database locking strategy; reorganize tests
PostgreSQL and MySQL both have better locking mechanisms than what was previously implemented, as well
2017-07-07 21:06:38 -04:00