mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-23 03:56:14 +01:00
Commit graph

79 commits

Author SHA1 Message Date
Oliver Klee
fddd50da3e
[CLEANUP] Convert one more mock to a stub (#977)
This makes the purpose of the mock/stub more explicit.
2023-11-05 22:46:37 +01:00
Oliver Klee
286aa05073
[TASK] Use more stubs in the unit tests (#962)
This way, the purpose of the stub/mock is more explicit.

Fixes #870
2023-11-01 21:15:42 +01:00
Oliver Klee
350fe8abb2
[CLEANUP] Simplify the mock building in the unit tests (#963) 2023-11-01 19:59:07 +00:00
Oliver Klee
a444e2266c
[CLEANUP] Make the TYPO3 version switches more consistent (#964)
Also reduce the cognitive load as these switches are between
V12 and pre-V12.
2023-11-01 19:56:10 +00:00
Łukasz Uznański
bc64aedb38
[TASK] Use own configuration files for tests (#952)
Resolves: #902
2023-10-25 19:08:36 +02:00
Oliver Klee
b4c93d8dea
[TASK] Switch the TeaController to construtor injection (#881)
Fixes #869
2023-07-03 14:26:21 +02:00
Oliver Klee
cda38af84b
[FEATURE] Add a delete functionality for the Tea FE editor (#876)
The delete action is triggered using a form with a submit button,
causing a POST request to be sent instead of a GET request.
This is because GET requests should not modify (or delete) data,
but only read it and be idempotent. Also, the request then
is guaranteed to not get cached.

From a usability perspective, a button instead of a link also
is semantically more correct: A link is expected to bring you
to some place, whereas a button is expected to trigger some
action.

Closes #871
2023-06-23 11:55:19 +02:00
Oliver Klee
82e7e95487
[FEATURE] Allow creating a new tea in the FE (#874)
Part of #871
2023-06-22 20:30:12 +02:00
Oliver Klee
ad460b20b3
[FEATURE] Add FE editing for existing tea records (#872)
Part of #871
2023-06-22 14:20:14 +02:00
Oliver Klee
1f263d8839
[FEATURE] Add a list view for the FE tea editor (#864)
This is one more part of building CRUD functionality.
2023-06-22 11:17:51 +00:00
Oliver Klee
8fe9307b37
[BUGFIX] Allow ActionController::redirect in tests again (#865)
In TYPO3 12LTS, this method still exists. So we are still able
to mock it.
2023-06-22 11:49:12 +02:00
Oliver Klee
bbe469169b
[FEATURE] Add Tea.ownerUid (#860)
This is a pre-patch for adding a CRUD plugin for tea records.

This property contains only the UID of the owner FE user, but not
a relation to a FE user model. This is because we neither have nor
need a FE user model for the purposes of the CRUD plugin.
2023-06-21 09:16:13 +02:00
Oliver Klee
2ab50201fa
[TASK] Make the controller tests more fine-grained (#856)
Tests should only test one thing (if possible).
2023-06-20 07:19:57 +00:00
68372cc850
[TASK] Make all test cases final (#801)
Resolves: #797
2023-04-06 14:34:15 +00:00
4d2bbced74
[BUGFIX] Do not mock unavailable methods (#799) 2023-04-06 14:32:05 +02:00
Oliver Klee
14b8628483
[TASK] Stop using Prophecy (#676)
The Prophecy project is basically dead, and our Prophecy dependency
currently prevents installations on PHP 8.2 without having to resort
to fiddling with Composer's platform options.
2022-11-05 17:08:32 +01:00
Oliver Klee
6b957de595
[FEATURE] Allow installations on TYPO3 12 (#652) 2022-10-19 09:06:36 +02:00
Oliver Klee
b3f0eb3f3d
[CLEANUP] Use more native property types in the tests (#628) 2022-10-10 16:05:06 +02:00
Oliver Klee
0a1a00dd22
[CLEANUP] Drop usages of ObjectManager whereever possible (#616)
Fixes #596
2022-10-10 02:15:33 +02:00
Oliver Klee
f6af430180
[TASK] Upgrade to PHPUnit 9 (#610)
Also upgrade PHPCOV to match the used PHPUnit version

Fixes #586
Fixes #542
2022-10-09 06:19:32 +02:00
Oliver Klee
bb7e6d2670
[CLEANUP] Add more native type annotations in the tests (#612) 2022-10-06 17:51:41 +02:00
Lina Wolf
e469041db7
[CLEANUP] Use typed properties instead of @var annotations (#599)
The `@var` annotations where left where it is not possible yet to replace them in PHP 7.4.

Fixes #550

Co-authored-by: lina.wolf <lwolf@w-commerce.de>
2022-10-03 19:00:55 +02:00
Lina Wolf
5d3fcee00e
[TASK] Return ResponseInterface in controller actions (#597)
Co-authored-by: lina.wolf <lwolf@w-commerce.de>
2022-10-03 16:02:32 +02:00
Oliver Klee
e360b1ea5a
[TASK] Also mock redirectToUri in the controller unit test (#554)
Now all methods that conceptually should not be part of a controller
(and that hence must never be executed in a unit test)
are mocked for consistency.

Also sort the method names.

Fixes #446
2022-09-06 15:26:47 +02:00
Oliver Klee
62e8c21596
[CLEANUP] Make a type annotation in a unit test more specific (#435)
This helps static code analysis.
2022-04-20 15:05:45 +02:00
Oliver Klee
345e01e381
[CLEANUP] Drop an unnecessary field in a test (#413) 2022-04-03 02:25:42 +02:00
Oliver Klee
934f43572f
[CLEANUP] Use generics for Prophecy type annotations (#398) 2022-02-28 17:58:06 +01:00
Oliver Klee
4f2c813d7f
[TASK] Switch to the core testing framework (#361)
The TYPO3 core testing framework has more person-power for maintenance
behind it compared to the nimut testing framework. So we should use that.
2022-02-20 15:18:46 +01:00
Oliver Klee
074ecf6cbd
[TASK] Upgrade PHPStan & friends (#357)
Also re-generate the baseline, and update a type annotation to match
what the current version of jangregor/phpstan-prophecy now recognizes.
2021-12-25 02:39:48 +01:00
Łukasz Uznański
f0127b3b64
[TASK] Fix php cs related to official configuration (#341)
Co-authored-by: Łukasz Uznański <l.uznanski@macopedia.com>
2021-11-17 13:14:43 +01:00
Oliver Klee
ca9a8e4e15
[TASK] Always use @covers annotations in the tests (#298) 2021-09-15 02:11:15 +02:00
Oliver Klee
6e927a8656
[CLEANUP] Fix the Prophecy-related type annotations (#299) 2021-09-15 02:09:37 +02:00
Łukasz Uznański
4bde411dd8
[TASK] Remove author annotations (#294)
Co-authored-by: Łukasz Uznański <l.uznanski@macopedia.com>
2021-09-07 08:51:11 +02:00
Oliver Klee
a9f64159ec [TASK] Switch the code sniffing from PSR-2 to PSR-12 (#35)
Also update the corresponding packages and autoformat the code again.

Fixes #3
2019-12-07 17:44:32 +01:00
Andreas Wolf
3f3c9285d9 [CLEANUP] Fix PHP_Codesniffer issues
Resolves: #21
2019-12-07 12:13:32 +01:00
Oliver Klee
29bf7ccae5
[TASK] Convert the PHP namespaces to "TTN" (#9)
Fixes #1
2019-12-01 12:16:06 +01:00
Oliver Klee
b519583431
[CLEANUP] Fix code inspection warnings (#57) 2019-08-12 17:43:02 +02:00
Oliver Klee
3401e32a84
[FEATURE] Add PHP-CS-Fixer (#53)
Also run the fixer on all classes and tests.
2019-08-12 17:25:59 +02:00
Oliver Klee
3e1fd7416f
[FEATURE] Tea single view (#26) 2018-05-28 17:05:39 +02:00
Oliver Klee
dd1ea7868d
[FOLLOWUP] Fix copy'n'paste error in view class in annotation (#20)
[ci skip]
2018-05-26 21:13:02 +02:00
Oliver Klee
436a10b9d6
[FEATURE] Tea plugin with TeaController and index action (#19) 2018-05-26 20:46:55 +02:00
Oliver Klee
09dc1281ca
[FEATURE] Add Tea.image as a FAL example (#15) 2018-05-25 22:39:33 +02:00
Oliver Klee
e2f39033c0
[FEATURE] Tea model and repository (#10) 2018-05-25 16:19:12 +02:00
Oliver Klee
bbb6f8e5f0
[TASK] Add the default directory structure (#7)
Also use spaces for indentation in the .htaccess files.
2018-01-27 15:54:51 +01:00
Oliver Klee
4b7ffe0546 [CLEANUP] Empty out the extensions 2017-12-22 22:20:43 +01:00
Oliver Klee
a2b322d53c [CLEANUP] Use a dedicated inject method
This will improve performance.
2017-12-09 17:41:35 +01:00
Oliver Klee
563f4befbf [CLEANUP] Use strict types, scalar type hinting and return types 2017-09-08 18:04:28 +02:00
Oliver Klee
a8b687a656 [TASK] Switch the unit tests to nimut/testing-framework 2017-09-07 16:22:21 +02:00
Oliver Klee
1c1f846858 [CLEANUP] Switch to Prophecy 2017-05-05 19:12:44 +02:00
Oliver Klee
bc58abde55 [TASK] Make the extension compatible with TYPO3 CMS 7.6 2016-07-16 21:39:04 +02:00