Commit Graph

29 Commits

Author SHA1 Message Date
Toby Zerner
1c1cefa017 Update test namespaces 2018-01-11 01:25:10 +10:30
Daniel Klabbers
4d9e2335c7 pleasing the angry god Circle 2017-11-27 11:05:15 +01:00
Daniel Klabbers
3f9dc81874 satisfying styleci, undo mysql in travis 2017-10-05 14:02:54 +02:00
Daniel Klabbers
1c01145a14 fixed those exception handling tests 2017-10-05 13:57:31 +02:00
Franz Liedke
66abd7ecfd
Extract new Flarum\Post namespace 2017-10-03 18:47:23 +02:00
Franz Liedke
6c9ff72efb
Finalize Flarum\Foundation namespace 2017-10-03 18:47:23 +02:00
Franz Liedke
564ea8ff73
Extract new Flarum\User namespace 2017-10-03 18:47:23 +02:00
Franz Liedke
9b24fbd5e5
Restructure Flarum\Api namespace 2017-10-03 18:45:40 +02:00
Toby Zerner
1031826a3d Apply fixes from StyleCI
[ci skip] [skip ci]
2016-11-29 05:03:53 +00:00
Toby Zerner
5f7291db39 Actually test IlluminateValidationExceptionHandler 2016-06-05 09:25:47 +09:30
Toby Zerner
f5988bae23 Distinguish between attributes/relationships in ValidationException
This exception could be a candidate for inclusion in tobscure/json-api...
2016-06-05 09:25:26 +09:30
Daniel Klabbers
5a7b57df96 adding new tests to cover api handlers, part 1 of #245 and #74 2016-03-03 11:00:11 +01:00
Toby Zerner
a6cf10f854 Applied fixes from StyleCI 2016-02-25 22:09:39 -05:00
Toby Zerner
d743e56bc1 Fix tests and CS 2015-12-05 22:31:33 +10:30
Kirk Bushell
409a63d77a Added validation handler tests 2015-10-28 12:46:49 +00:00
Kirk Bushell
78f6249b24 Added tests for permission denied exception handler 2015-10-28 12:41:28 +00:00
Kirk Bushell
2edda9baaa Added model not found error handler tests 2015-10-28 12:39:38 +00:00
Kirk Bushell
1b3d674c39 Added tests for invalid confirmation token handling 2015-10-27 14:47:03 +00:00
Kirk Bushell
400aa4fef9 Added more tests 2015-10-27 13:22:30 +00:00
Kirk Bushell
a4ef9e7cf4 Added output test for flooding exception handler 2015-10-27 12:54:10 +00:00
Kirk Bushell
f230c72ebb Fied broken test 2015-10-27 12:50:11 +00:00
Kirk Bushell
f0883471ef Updated tests namespace to be ps4-valid. Added tests for flooding exception, fixed broken code 2015-10-27 12:48:27 +00:00
Toby Zerner
ddfedcb4dd Add Interface suffix to SettingsRepository 2015-10-19 14:58:47 +10:30
Toby Zerner
b53e612007 Fix failing tests + CS 2015-10-11 23:37:51 +10:30
Toby Zerner
dd67291ce0 Major refactor and improvements
- Reorganised all namespaces and class names for consistency and structure. Following PSR bylaws (Abstract prefix, Interface/Trait suffix).
  - Move models into root of Core, because writing `use Flarum\Core\Discussion` is nice. Namespace the rest by type. (Namespacing by entity was too arbitrary.)
  - Moved some non-domain stuff out of Core: Database, Formatter, Settings.
  - Renamed config table and all references to "settings" for consistency.
  - Remove Core class and add url()/isInstalled()/inDebugMode() as instance methods of Foundation\Application.
  - Cleanup, docblocking, etc.

- Improvements to HTTP architecture
  - API and forum/admin Actions are now actually all the same thing (simple PSR-7 Request handlers), renamed to Controllers.
  - Upgrade to tobscure/json-api 0.2 branch.
  - Where possible, moved generic functionality to tobscure/json-api (e.g. pagination links). I'm quite happy with the backend balance now re: #262

- Improvements to other architecture
  - Use Illuminate's Auth\Access\Gate interface/implementation instead of our old Locked trait. We still use events to actually determine the permissions though. Our Policy classes are actually glorified event subscribers.
  - Extract model validation into Core\Validator classes.
  - Make post visibility permission stuff much more efficient and DRY.

- Renamed Flarum\Event classes for consistency. ref #246
  - `Configure` prefix for events dedicated to configuring an object.
  - `Get` prefix for events whose listeners should return something.
  - `Prepare` prefix when a variable is passed by reference so it can be modified.
  - `Scope` prefix when a query builder is passed.

- Miscellaneous improvements/bug-fixes. I'm easily distracted!
  - Increase default height of post composer.
  - Improve post stream redraw flickering in Safari by keying loading post placeholders with their IDs. ref #451
  - Use a PHP JavaScript minification library for minifying TextFormatter's JavaScript, instead of ClosureCompilerService (can't rely on external service!)
  - Use UrlGenerator properly in various places. closes #123
  - Make Api\Client return Response object. closes #128
  - Allow extensions to specify custom icon images.
  - Allow external API/admin URLs to be optionally specified in config.php. If the value or "url" is an array, we look for the corresponding path inside. Otherwise, we append the path to the base URL, using the corresponding value in "paths" if present. closes #244
2015-10-08 14:28:02 +10:30
kirkbushell
b179ca1c48 Added tests for admin login/cookie checks 2015-09-28 16:02:37 +01:00
kirkbushell
c3374197d1 Added zend-stragility (missing), removed some redundant code. 2015-09-28 15:59:07 +01:00
kirkbushell
a00226c05a Added some tests for the database setting repository 2015-09-28 15:34:32 +01:00
kirkbushell
7706714ad9 Removed phpsec as the testing library, added phpunit and converted the first spec test to phpunit format. Also added mockery. 2015-09-28 15:09:13 +01:00