Commit Graph

880 Commits

Author SHA1 Message Date
Philipp ac0e2aa901
Update tests/src/Core/Config/Util/ConfigFileTransformerTest.php
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
2023-01-21 19:44:27 +01:00
Philipp 9627af924a
Add support for toString/Serializable 2023-01-21 19:42:48 +01:00
Philipp 293c121c48
Adhere PHP-CS.. 2023-01-16 22:25:26 +01:00
Philipp f609e38600
Introduce new Hook logic
- InstanceManager for computing strategies and to allow decorators
- Adapting Core\Logger to use it
2023-01-16 22:20:33 +01:00
Philipp ab6efea9b2
Replace Config-Cache dependency with Config-Model (no more DB-waiting necessary) 2023-01-15 16:17:08 +01:00
Philipp a6fb683bcd
Remove BasePath dependency from App\Mode 2023-01-15 16:17:07 +01:00
Hypolite Petovan 21f172c585
Merge pull request #12674 from nupplaphil/bug/config_typesafe
Config: Improve the node.config.php transformation
2023-01-15 09:38:29 -05:00
Philipp 4c28f9cf9c
Config: Improve the node.config.php transformation
- Add more types
- Improvement for assoziative arrays and key-value arrays
- Add a lot more tests
2023-01-15 00:53:51 +01:00
Philipp 11a8bd17e3
Assure that deleted cat/keys are working as expected
- A deleted cache-key would delete a merged cache-key as well
- Deleting a key in the Model results in reloading the config to assure any value from underlying files
2023-01-11 21:53:34 +01:00
Philipp fd882abd80
Revert Cache delete() behavior to stable version 2023-01-11 21:10:59 +01:00
Hypolite Petovan 5e2b655b43 Add implementation of HTTP Media Type
- Add charset extraction from DOMDocument
- TESTS!
2023-01-10 10:36:58 -05:00
Hypolite Petovan 6bee344681 Add yet another case to DateTimeFormat::fix
- Address https://github.com/friendica/friendica/issues/12488#issuecomment-1372637862
2023-01-09 11:38:25 -05:00
Hypolite Petovan 8547014735 Update API unsupported test 2023-01-08 02:36:26 -05:00
Philipp 2293ff6206
Add test for Addon failures 2023-01-08 02:49:56 +01:00
Philipp 0429a4e429
Fix loading empty node.config.php 2023-01-08 02:49:56 +01:00
Philipp c8b9e40b85
remove print_r 2023-01-06 02:54:28 +01:00
Philipp 18293280b7
Add license 2023-01-06 01:12:54 +01:00
Philipp 5aa8e8adf1
Config fixings
- Delete now really overwrites static default/setting.config.php keys
- Delete now really overwrites static default/setting.config.php categories
- The Update::check() routine is added to different places
- Merge the given config file with the new config before writing
- Remove ConfigTransaction::get() because it's no more reliable
2023-01-06 01:03:00 +01:00
Philipp cdd57275eb
Some improvements
- Move $_SERVER into ConfigFileManager constructor
- Rename "creatConfigFileLoader" to "createConfigFileManager"
- Rename variable "loader" to "manager" in all tests
2023-01-06 01:03:00 +01:00
Michael Vogel 2f28ec7af0
Merge pull request #12615 from MrPetovan/task/12601-update-gserver-block
Drop UpdateGServer worker task if domain is blocked
2023-01-05 12:37:00 +01:00
Philipp 13b234d279
Use addons config entries instead of the addon table 2023-01-04 21:55:51 +01:00
Hypolite Petovan a574146f04 Add UriInterface-enabled cleanUri method in Model\GServer
- Tests!
2023-01-04 14:41:08 -05:00
Philipp dce86be58e
Just commit config transactions if something changed 2023-01-04 19:55:22 +01:00
Philipp c057954896
Make BaseURL check/save transactional and make the whole process easier 2023-01-04 08:14:00 +01:00
Philipp 2292263780
Add more special chars at tests 2023-01-04 00:25:17 +01:00
Philipp 4c2fc3ea38
Reduce config->set() load for worker executions 2023-01-04 00:25:15 +01:00
Philipp b439df892a
Apply suggestions 2023-01-03 17:24:05 +01:00
Philipp 072464119a
Make PHP-CS happy 2023-01-03 15:40:57 +01:00
Philipp dd88d193b9
Escape single quotes and backslashes 2023-01-03 15:36:36 +01:00
Philipp 65d79d4c93
Introduce ISetConfigValuesTransactional for transactional config behaviour 2023-01-03 14:22:07 +01:00
Philipp 4d4b4a8858
Revert BaseURL 2023-01-03 14:22:07 +01:00
Philipp 5ff1d431aa
add another test 2023-01-03 14:22:06 +01:00
Philipp 10f3de0aa2
Remove deprecated Mode::DBCONFIGAVAILABLE 2023-01-03 14:22:04 +01:00
Philipp 326566638f
adapt tests 2023-01-03 14:22:03 +01:00
Philipp fea4b202c1
Introduce ConfigFileTransformer for Config files 2023-01-03 14:22:02 +01:00
Hypolite Petovan 1874a32728 Happy New Year 2023! 2023-01-01 09:36:24 -05:00
Hypolite Petovan b6f3f298fe Add new case to DateTimeFormat::fix
- Address https://github.com/friendica/friendica/issues/12488#issuecomment-1368011436
2022-12-30 21:40:37 -05:00
Philipp 9936081c7e
Fix DBA lock test 2022-12-29 22:56:27 +01:00
Philipp 86f80af432
Rename Interface 2022-12-29 22:37:12 +01:00
Philipp 7c4c409060
Change key-value table
- Make "k" as primary key
- Added "updated_at"
2022-12-29 22:36:08 +01:00
Philipp 47764387b3
Introduce Key-Value Pair storage provider 2022-12-29 21:53:56 +01:00
Hypolite Petovan a1dc6e2417 Switch rounding to flooring in Temporal::getRelativeDate
- Add tests for regression
2022-12-28 00:32:26 -05:00
Hypolite Petovan 53c0fffbec Add ClockInterface dependency to Temporal::getRelativeDate
- Remove unused $format parameter
2022-12-28 00:31:20 -05:00
Hypolite Petovan 5c332af844
Merge pull request #12527 from nupplaphil/feat/request_id
Introduce Request::getRequestId()
2022-12-26 16:07:35 -05:00
Philipp 4f1bb0d274
Use X-REQUEST-ID for Error pages 2022-12-26 21:18:05 +01:00
Philipp bfc1c157f1
Adapt UserSession
- Move from App methods to UserSession methods
- Deprecate corresponding App methods
2022-12-26 21:18:04 +01:00
Michael 80247bd1ca Fix tests 2022-12-25 10:57:27 +00:00
Michael c0c70427f3 Tests 2022-12-25 10:52:47 +00:00
Michael 5298cd73b3 We now store the violation as well 2022-12-25 10:44:06 +00:00
Michael fd53cf824f Tests 2022-12-25 07:40:19 +00:00
Michael cef4349421 Changed parameter order 2022-12-25 07:30:39 +00:00
Michael 59a848c8ec Tests 2022-12-24 23:26:54 +00:00
Michael 8a7d08ae28 Category added 2022-12-24 13:57:43 +00:00
Michael 4c945850f4 Reports: The reporting contact id is added 2022-12-24 08:03:37 +00:00
Hypolite Petovan 91c4ab2359 Add new xpathQuote and checkRelMeLink methods to Content\Text\HTML class
- Add tests for both methods
2022-12-23 02:41:22 -05:00
Michael ace80ca1b4 Use "author_handle" for the author handle extracted from Diaspora XML messages
- We have structured data under the variable name "author"
- Remove unused $uid parameter from Diaspora::storeByGuid
- Convert $person parameter to just its URL in Diaspora::authorContactByUrl
- Flip parameters in getUriFromGuid to get rid of $onlyfound
2022-12-05 00:00:49 -05:00
Hypolite Petovan 55640eec87 [Composer] Upgrade to phpseclib version 3
- Create custom Key file format for Salmon Magic key
- Remove obsolete pemToME and MEtoPem Crypto methods
- Remove unused newECKeypair Crypto method
- Switch to constant-time Base64 encode/decode in Base64Url Strings methods
2022-11-25 08:13:05 -05:00
Hypolite Petovan 17a3a48210 Add new Moderation\Report domain classes 2022-11-14 12:22:52 -05:00
Hypolite Petovan 9aa05eb911 Deprecate themes duepuntozero, quattro and smoothly 2022-11-05 00:06:10 -04:00
Hypolite Petovan f418687a71
Merge pull request #12070 from annando/share
Some more improvements for posts with shares
2022-10-27 08:19:23 -04:00
Michael e31533d0d3 Possibly fix test 2022-10-27 06:31:09 +00:00
Roland Häder 913a4a5dc0
Fixed code-standards complain by php-cs, thanks to @MrPetovan 2022-10-25 22:45:50 +02:00
Roland Häder b1cf4cbbd5
Changes:
- added unit-test for `Temporal::getRelativeDate()` method
2022-10-25 21:30:56 +02:00
Philipp 7c4611af19
Update tests/src/Core/Session/UserSessionTest.php
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
2022-10-20 20:47:43 +02:00
Philipp 940619325d
Add SessionUsers class including tests 2022-10-20 20:27:34 +02:00
Philipp 497fc4e432
Move Monolog to Addons 2022-10-17 22:22:00 +02:00
Michael 62a0d55fc8 The friendica constants have been moved to the app class 2022-10-17 10:37:48 +00:00
Hypolite Petovan a4b0ebf160 Add a couple of cases to DateTimeFormat::fix()
- Reworked method to perform more string replacements and fewer regular expression matches
2022-10-09 09:34:38 -04:00
Hypolite Petovan bee6506d33 Only call DateTimeFormat::fix() when there's an Exception
- This prevents valid date/time strings to be mangled by fix()
2022-10-09 09:34:30 -04:00
Hypolite Petovan 345d307ae0 Add tests for DateTimeFormat::fix() 2022-10-07 23:10:50 -04:00
Michael ee03e4de08 Fix test 2022-10-07 08:13:26 +00:00
Michael a07fd7d7c2 Spaces to tabs 2022-10-07 08:07:12 +00:00
Michael 8e9acfe210 Fix tests? 2022-10-07 05:22:10 +00:00
Philipp 2d4598a4db
adapt return type 2022-09-25 23:17:37 +02:00
Philipp 60b1cac166
Add empty testcase for later .. would work if we could mock applications 2022-09-25 21:39:29 +02:00
Hypolite Petovan 3e1b6890b7 Fix removing falsy text nodes in HTML::tagToBBCodeSub
- This wrongly removed text nodes containing just '0'
2022-09-24 22:03:49 -04:00
Hypolite Petovan 97ccb4d2c4 Make server domain pattern block reason mandatory 2022-07-28 05:39:51 -04:00
Hypolite Petovan 1810b32c26 Move server domain pattern blocklist features to its own class
- Update tests
2022-07-28 05:38:50 -04:00
Michael 06698cc5f6 Test? 2022-07-17 09:31:44 +00:00
Michael f0fe323832 Possibly now the tests work 2022-07-17 09:17:07 +00:00
Michael 5188180094 Fixed test 2022-07-17 09:08:12 +00:00
Michael 760aecefd8 Test added 2022-07-17 09:02:28 +00:00
Roland Häder 3546d0aabe
This class has already been "imported". 2022-07-16 08:17:43 +02:00
Philipp 41803cb731
Fix tests 2022-07-12 23:40:31 +02:00
Philipp 83a16ac114
Add test case for https://github.com/friendica/friendica/issues/11726 2022-07-12 20:10:17 +02:00
Hypolite Petovan 91f5a7cc6b Convert potential spaces in Memcache(d) key names
- Address https://github.com/friendica/friendica/issues/11630#issuecomment-1166475036
- Add test for space in cache keys
2022-06-26 07:30:30 -04:00
Philipp 2248850f78
add anything .. 2022-06-25 23:06:42 +02:00
Philipp 0223c030a9
Improve 2 factor usage 2022-06-25 23:04:00 +02:00
Hypolite Petovan 7c1ae71527 Add tests for BBCode::fetchShareAttributes 2022-06-25 11:46:53 -04:00
Philipp 5bf5b5e6c9
adaptions :-) 2022-06-23 23:01:09 +02:00
Philipp 13783089e7
Add copyright 2022-06-23 22:44:17 +02:00
Philipp d441b90bda
Respect Forwarded-For headers 2022-06-23 22:42:35 +02:00
Roland Häder e96a548286
Changes:
- dumped default value for $input
- added unknown 'platform' which prevents an "Undefined index: platform in
  /var/www/.../src/Model/GServer.php on line 940" error
2022-06-20 18:56:22 +02:00
Roland Häder e5cc7a5ab1
Fixes:
- Strings::isHex() should not be misused for checking on NULL
2022-06-20 08:25:45 +02:00
Roland Häder 6743de63f5
Changed:
- DBA::exists() should only be used for checking if records exists.
- if you want to check if a table exists, please ALWAYS use
  DBStructure::existsTable() instead
2022-06-20 08:20:07 +02:00
Hypolite Petovan 25876099ce Add tests for BBCode::getAbstract and BBCode::stripAbstract methods 2022-05-07 22:19:50 -04:00
Hypolite Petovan b7cee324b0 Add legacy notification endpoint for deprecated Notify entity
- Add dependencies to Notifications\Notification module class
2022-03-14 07:56:21 -04:00
Michael 329dc22137 Fix test? 2022-02-25 21:03:16 +00:00
Philipp c4e40734df
adapt test 2022-02-15 23:17:40 +01:00
Michael 7f59dc07c4 New lines added 2022-01-30 16:30:49 +00:00
Michael 273f4c352e Spaces 2022-01-30 16:26:29 +00:00
Michael 4f60b1660e Added test data 2022-01-30 16:21:07 +00:00
Michael 95664a6824 Removed empty line 2022-01-30 16:06:19 +00:00
Michael baf8951745 Converted in tabs 2022-01-30 16:00:17 +00:00
Michael 71959bb9fc Added some testable data 2022-01-30 15:57:54 +00:00
Michael 3fab53d335 Fix whitespace 2022-01-30 15:17:27 +00:00
Michael 72f755ce91 Empty test function added 2022-01-30 15:12:07 +00:00
Philipp 3d8e82d95d
Merge pull request #11141 from urbalazs/language-names
Add native language names to language selector & fix config during install
2022-01-23 20:55:40 +01:00
Philipp 150e3a6f42
Add DEVELOP flag for StorageManager for testing purpose only 2022-01-23 20:40:38 +01:00
Philipp 7ec4d42461
Fix test 2022-01-23 20:29:46 +01:00
Philipp 40b3c69eec
Adapt test names 2022-01-22 21:43:30 +01:00
Philipp fbefb599dc
Move last legacy API tests & adapt phpunit.xml 2022-01-22 21:29:43 +01:00
Michael 51dcfe134e fixing some more tests 2022-01-16 20:58:58 +00:00
Michael 0f7b48c53e Fix wrong return value 2022-01-16 20:37:50 +00:00
Michael 88ac888a3b Fix some tests 2022-01-16 20:25:46 +00:00
Philipp c3be053742
Add license header to various tests 2022-01-07 00:35:28 +01:00
Philipp f6c240c062
Fix intended failure ;-) 2022-01-06 23:08:00 +01:00
Philipp 3e0bcf7acd
Add license check 2022-01-06 22:28:00 +01:00
Michael 543cc7f51f Moved tests, changes after review 2022-01-06 20:13:32 +00:00
Philipp 6dbbd08179
Use rawContent for Special Options to avoid a protected options() method 2022-01-04 20:59:29 +01:00
Philipp 37f850377e
Fix App routing 2022-01-04 20:59:28 +01:00
Philipp dc46af5ea1
Automatically return allowed HTTP methods for OPTIONS per specific endpoint 2022-01-04 20:59:27 +01:00
Philipp c1f2e391b0
Move Arguments reset to right place 2022-01-04 20:59:26 +01:00
Philipp 5e85939502
Introduce FixtureTest::useHttpMethod for manually overwrite the HTTP Method argument 2022-01-04 20:59:26 +01:00
Philipp ee2a15d822
Add HTTP method to App\Arguments 2022-01-04 20:59:25 +01:00
Philipp c7f2ba213b
Fix OPTIONS 2022-01-04 20:59:25 +01:00
Philipp eaad220738
Add explicit status setting for PSR/ResponseInterface & add tests for OPTIONS endpoint 2022-01-04 20:59:25 +01:00
Philipp 322b7c856c
Merge pull request #11129 from urbalazs/copyright-2022
Update copyright
2022-01-02 09:45:35 +01:00
Balázs Úr e56a53647b Update copyright 2022-01-02 08:27:47 +01:00
Philipp 301ac83ebf
Add feedback - avoid intermediate variables 2022-01-02 01:04:04 +01:00
Philipp adf0d7bc95
Fix typo 2022-01-02 00:21:38 +01:00
Philipp 4c77e99f89
Add title to the text/html content for Twitter status object 2022-01-01 23:14:52 +01:00
Philipp 2f13afb4c0
Fix database lock driver test 2022-01-01 21:24:16 +01:00
Philipp 9d8a420391
Move API RSS tests 2021-12-30 22:37:23 +01:00
Philipp 29dbfb58c7
Move another API status tests 2021-12-30 22:17:03 +01:00
Philipp 2e221943d4
Move ApiResponse & Twitter Status tests 2021-12-30 22:08:46 +01:00
Philipp 2c15fb03ff
Move API status tests 2021-12-30 22:02:57 +01:00
Philipp 0b08730a0b
Move getAttachement tests 2021-12-30 21:56:22 +01:00
Philipp c03ddf0891
Move API Status tests 2021-12-30 21:52:18 +01:00
Philipp 6412484fa6
Move API DirectMessage tests 2021-12-30 21:07:20 +01:00
Philipp f0b97d8e13
Move API User tests 2021-12-30 20:51:21 +01:00
Philipp 51c94016cd
Move API User tests 2021-12-30 20:50:42 +01:00
Philipp 0f40aec0e3
Move DirectMessages/Conversation tests 2021-12-30 20:18:34 +01:00
Philipp 07eca542a4
Move DirectMessages/Sent tests 2021-12-30 20:16:48 +01:00
Philipp 95e3583c68
Move DirectMessages/All tests 2021-12-30 20:04:32 +01:00
Philipp e7c5bdc779
Move DirectMessages/Inbox tests 2021-12-30 20:02:53 +01:00
Philipp 0c4c6faa54
Move DirectMessages/Destory tests & fix Destroy condition 2021-12-30 19:58:19 +01:00
Philipp 3374cac767
Move DirectMessages/New tests 2021-12-30 19:46:13 +01:00
Philipp 5d69f7411d
Add MessageDirect\Search tests 2021-12-27 20:02:37 +01:00
Philipp 015de29b7b
Replace assertRegExp() assertMatchesRegularExpression() 2021-12-12 20:19:52 +01:00