37 Commits

Author SHA1 Message Date
Roardom
46bfccc8b7 refactor: use enums for auth guards, middleware groups, and rate limits 2025-06-22 20:00:02 +00:00
Roardom
b86475a732 add: strict types to all files 2024-05-23 13:58:29 +00:00
HDVinnie
836fd2777c PHP Style Change (Laravel Pint CI) 2023-07-17 22:32:06 +00:00
HDVinnie
6af8a72af6 update: test-suite
- Tests: 422 incomplete, 318 passed (684 assertions) and coverage Total: 22.7%.
2023-07-17 18:30:58 -04:00
HDVinnie
8daf39c331 update: test suite 2023-07-11 16:48:07 -04:00
Shift
39e8a86b88 Generate HTTP tests for controllers 2023-07-11 18:27:15 +00:00
Shift
0f33d2846d Define test classes as final 2023-07-10 18:54:51 +00:00
Shift
812238b4b8 Adopt PHP attributes in test classes 2023-07-10 18:54:51 +00:00
Roardom
741adef615 add: moderation scopes 2023-07-10 04:20:40 +00:00
Roardom
0000838d8b refactor: cruddy torrents
Separate torrents into cruddy route names. Route model binding isn't possible due to the global scope on unapproved torrents. Use form requests. Simplify the controller flow where possible.
2023-07-07 03:18:13 +00:00
Roardom
ae81678287 update: optimize api
Make pagination opt in by default

Stop calculating thanks and comment count for the API since it's not used for anything
2023-04-10 00:39:24 +00:00
HDVinnie
2ca429c4ce Revert "PSR12 Linting"
This reverts commit 7e65e1d589.
2022-09-11 19:51:58 -04:00
HDVinnie
7e65e1d589 PSR12 Linting 2022-09-11 23:50:41 +00:00
HDVinnie
97394c062f chore: adopt type hints 2022-01-07 23:35:33 -05:00
HDVinnie
5b6d49c2be fix: tests 2021-10-20 14:43:59 -04:00
HDVinnie
514bc33ff7 update: tests 2021-10-20 14:13:00 -04:00
Laravel Shift
fac1da0b42 Shift cleanup 2020-09-08 22:25:06 +00:00
Laravel Shift
089632a4ac Namespace seeders 2020-09-08 22:24:37 +00:00
Laravel Shift
add31768f5 Shift to class based factories 2020-09-08 22:24:30 +00:00
HDVinnie
231c33927a chore: styleci 2020-06-06 22:16:10 -04:00
HDVinnie
5756be5432 update: tests 2020-06-06 22:14:31 -04:00
HDVinnie
3e5cbfa249 Merge branch 'master' into Types-System-Refactor 2020-05-27 05:50:53 -04:00
PHP Shift
d8b188772f Shift return type of base TestCase methods
From the [PHPUnit 8 release notes][1], the `TestCase` methods below now declare a `void` return type:

- `setUpBeforeClass()`
- `setUp()`
- `assertPreConditions()`
- `assertPostConditions()`
- `tearDown()`
- `tearDownAfterClass()`
- `onNotSuccessfulTest()`

[1]: https://phpunit.de/announcements/phpunit-8.html
2020-05-26 00:59:55 +00:00
HDVinnie
fb7c4ac723 fix: api torrent controller test 2020-05-19 01:44:33 -04:00
HDVinnie
57f273ba72 update: api torrent controller test 2020-05-19 01:27:38 -04:00
HDVinnie
102e283eac update: API Torrent Controller Test 2020-03-22 11:53:17 -04:00
Ben Johnson
aa32a893fa tests: Implement TorrentController API tests
As part of this effort, a dedicated "torrents" storage location was
added to filesystems.php, which affects the torrent file storage
location. Accordingly, the torrent files in existing installations will
need to be moved (or symlinked) upon upgrade. The primary reason for
this change is mentioned in the Laravel docs: "This convention will
keep your publicly accessible files in one directory that can be easily
shared across deployments when using zero down-time deployment systems
like Envoyer."
2020-02-24 15:24:50 -05:00
Ben Johnson
b025e27b3e tests: Delete conflicting DemoFactory
This factory was causing unexpected behavior with the UserFactory;
basically, this factory was taking precedence whenever
factory(User::class) was called.

Oddly, this factory was effective only in the Travis-CI environment and
not anybody's respective local environment. Presumably, some nuance
with the filesystem coupled with Composer's autoloader affects the
order in which the respective factories are registered in different
environments.

In any case, this factory is no longer useful and is hereby deleted,
which fixes a handful of test methods that heretofore had to be marked
as incomplete.
2020-02-23 20:20:01 -05:00
Ben Johnson
a6f606ed9f tests: Improve several tests 2020-02-21 17:51:22 -05:00
Ben Johnson
13cdfe1f6b tests: Fix incorrect ID reference 2020-02-20 17:12:23 -05:00
Ben Johnson
362ce3b37a style: Style-CI fixes 2020-02-20 16:43:03 -05:00
Ben Johnson
5db70a9ea8 tests: Flesh-out several more ChatController tests 2020-02-20 16:38:43 -05:00
Ben Johnson
837d84c82a tests: Add a couple more tests 2020-02-19 22:08:19 -05:00
Ben Johnson
1cd88b8430 tests: Add tests for a couple of ChatController methods 2020-02-18 19:50:52 -05:00
Ben Johnson
65d602f058 tests: Move scaffolded tests into Todo directory
Currently, the test suite requires way longer than necessary because it runs all the scaffolded tests, even though they exit immediately.

Moving them until they are implemented will speed-up the test suite execution time dramatically.
2020-02-17 15:56:39 -05:00
HDVinnie
987bed7a7b Apply fixes from StyleCI
[ci skip] [skip ci]
2020-02-13 21:45:47 +00:00
Laravel Shift
daa7cad1b4 Generate HTTP tests for controllers 2020-01-22 17:19:02 +00:00