- 11 Sep, 2012 1 commit
-
-
Christian Kuhn authored
There are still some fixture files within the root tests/ directory. The patch moves them to Fixtures/ folders below the using tests within the affected core and backend extensions. Change-Id: Ied23b542a65becac02c9af576728da886552484d Resolves: #40834 Related: #40095 Releases: 6.0 Reviewed-on: http://review.typo3.org/14525 Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn
-
- 09 Sep, 2012 1 commit
-
-
Christian Kuhn authored
TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance() is a method for unit tests to inject singleton mocks for classes that are instantiated with makeInstance. purgeInstances() can be used to reset all registered singletons, so makeInstance() creates new objects after that. purgeInstances() can change the behaviour of tests that are executed afterwards, because *all* registered singletons are reset. Currently the helper methods for singletons around makeInstance() are not able to get the list of registered singletons, and reset them to the previous list. The patch introduces method getSingletonInstances() that returns a list of all registered singletons (used in setUp()), and method resetSingletonInstances() that resets registered singletons to a given stored list (used in tearDown()). This way it is possible to fiddle in tests with purgeInstances() without introducing side effects to other tests. All unit tests that used purgeInstances() are adapted to take care of re constitution of changed objects this way. Change-Id: I19dc869423a537226bb019e227d84b6f74fe9afc Resolves: #40780 Releases: 6.0 Reviewed-on: http://review.typo3.org/14487 Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn
-
- 02 Sep, 2012 1 commit
-
-
Christian Kuhn authored
GeneralUtility::fixPermissions has a bug if createGroup is set to the id of the root group (0), and does not set the correct group. This is fixed with a more sophisticated test in fixPermissions to allow 0 as valid group. Default for createGroup is empty string, so it is now checked with isset and strlen > 0 if chgrp() should be applied. Additionally, the FAL test permissionsAreCorrectlyRetrieved is splitted to four tests, and two of them are skipped if the test is run on linux as root. Change-Id: Icd3bb5808fef195da8394a8fd9c2797f9f01e9aa Resolves: #40523 Releases: 6.0 Reviewed-on: http://review.typo3.org/14288 Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn
-
- 26 Aug, 2012 1 commit
-
-
Christian Kuhn authored
This patch moves most unit tests of the tests/Unit/t3lib/ main directory. They follow the new class names of the classes under test and are namespaced. Covered are files that belong to the backend and core extension. The travis test configuration is adapted to execute tests located in those extension folders. Change-Id: Ibda0cb72596a418a3f97eeba83f39428a4d0d532 Resolves: #40247 Related: #40095 Releases: 6.0 Reviewed-on: http://review.typo3.org/14123 Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn
-
- 25 Aug, 2012 1 commit
-
-
Change-Id: If0c65781ea1c7e7979b22039cbc516040fa994e6 Resolves: #40201 Related: #40095 Releases: 6.0 Reviewed-on: http://review.typo3.org/14087 Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn
-
- 24 Aug, 2012 1 commit
-
-
Change-Id: I6d47d742afc0765bd9fd2aaf4b2fe45498f05f45 Resolves: #40109 Related: #40095 Releases: 6.0 Reviewed-on: http://review.typo3.org/14023 Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn
-
- 15 Aug, 2012 1 commit
-
-
When t3lib_div::quoteJSvalue() was used with second parameter set to TRUE closing HTML script tags were not escaped correctly. Now every character except harmless ones is encoded to a hex representation. Change-Id: I4ce17c924458bc4db659b2d37e7932cc9b0c340d Releases: 6.0, 4.7, 4.6, 4.5 Fixes: #23226 Security-Commit: ee1778ab0c7b4525dbabab4fcb94eb112b767e69 Security-Bulletin: TYPO3-CORE-SA-2012-004 Reviewed-on: http://review.typo3.org/13765 Reviewed-by: Oliver Hader Tested-by: Oliver Hader
-
- 14 Aug, 2012 1 commit
-
-
jsmin.php has a non free license. See referenced bug report for details. This patch replaces jsmin.php with a hook to provide a way for extensions to implement own compression algorithms. Change-Id: I1fc5bfe29aaa20692c4323dd28d5c0a95863cf3d Fixes: #31832 Releases: 6.0 Reviewed-on: http://review.typo3.org/6682 Reviewed-by: Marcus Schwemer Tested-by: Marcus Schwemer Reviewed-by: Stefan Neufeind Reviewed-by: Wouter Wolters Tested-by: Wouter Wolters Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn
-
- 01 Aug, 2012 1 commit
-
-
Tolleiv Nietsch authored
Adds the very handy option to use closures for the user functions. Change-Id: Iae2278c4d5d988eb0e882f575d0f2d441c238213 Resolves: #36784 Releases: 6.0 Reviewed-on: http://review.typo3.org/10941 Reviewed-by: Jochen Rau Tested-by: Jochen Rau Reviewed-by: Helmut Hummel Tested-by: Helmut Hummel
-
- 21 Jul, 2012 1 commit
-
-
Sometimes the core enforces classes to be prefixed with special names like 'tx_' or 'user_', especially if they are loaded as user functions. This constraint is in the core for a long time, but was already weakened by for example the extbase code, and was only required at some arbitrary points. The constraint itself does not make much sense, and is now fully removed with this patch. As an additional advantage, this patch eases the transition to namespaced class names. Notes: - Remove configuration Setting '[sys][additionalAllowedClassPrefixes]' - Update t3lib_registry to accept every namespace at least 2 chars long - Adapt tests - Remove and deprecate calls to t3lib_div::hasValidClassPrefix Change-Id: I0ba4fd41beb5f05bf87a14d735bb83922d62b247 Resolves: #39164 Releases: 6.0 Reviewed-on: http://review.typo3.org/12976 Reviewed-by: Daniel Lorenz Tested-by: Daniel Lorenz Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn
-
- 04 Jul, 2012 1 commit
-
-
The change in #38604 introduced failing UnitTests for t3lib_div::validPathStr, because we changed the return value to real boolean. The UnitTest was checked about a NULL value. With the change in #38604, we return FALSE. Change-Id: I8d7203564401f0add45fbdbaa7e0b371d57e5b7d Fixes: #38613 Releases: 6.0 Reviewed-on: http://review.typo3.org/12561 Reviewed-by: Georg Ringer Tested-by: Georg Ringer Reviewed-by: Oliver Hader Tested-by: Oliver Hader
-
- 02 Jul, 2012 1 commit
-
-
Christian Kuhn authored
Use one of the defined SYSLOG_SEVERITY_* constants from t3lib_div instead of an integer if calling t3lib_div::sysLog throughout the core. Change-Id: I728d72dbe4966f34a0b291a53cdb41e1adc6062b Fixes: #38571 Releases: 6.0 Reviewed-on: http://review.typo3.org/12526 Reviewed-by: Wouter Wolters Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn
-
- 30 Jun, 2012 1 commit
-
-
If gif_compress is disabled in the install tool, the test gifCompressFixesPermissionOfConvertedFileIfUsingGd fails, as the method it tests only does things if gif_compress is enabled. Change-Id: I91603452e43188cd38afeb3ca8b38e2913848e66 Fixes: #38501 Releases: 6.0, 4.7, 4.6, 4.5 Reviewed-on: http://review.typo3.org/12473 Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn
-
- 10 Jun, 2012 1 commit
-
-
Adds tests for _GP, _GPmerged, _GET, _POST and _GETset. Change-Id: I27b8db55d76b560854700baf518c686254c951ae Resolves: #37355 Releases: 6.0 Reviewed-on: http://review.typo3.org/11362 Reviewed-by: Philipp Gampe Tested-by: Philipp Gampe Reviewed-by: Mattias Nilsson Tested-by: Mattias Nilsson Reviewed-by: Wouter Wolters Tested-by: Wouter Wolters Reviewed-by: Oliver Klee Tested-by: Oliver Klee Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn
-
- 09 Jun, 2012 1 commit
-
-
Felix Kopp authored
Improves last outstanding function spacing issues of type OpeningFunctionBraceKernighanRitchieSpaceBeforeBrace. Change-Id: I393ca85d63779b5368ea6d8aaa8dbcf629ca0df6 Fixes: #37827 Reviewed-on: http://review.typo3.org/11877 Reviewed-by: Oliver Klee Reviewed-by: Georg Ringer Tested-by: Georg Ringer
-
- 25 May, 2012 1 commit
-
-
Tolleiv Nietsch authored
Adds tests for implodeArrayForUrl, explodeUrl2Array and compileSelectedGetVarsFromArray. Change-Id: I07c7ee3a743632056b4e061fdb32af63b92abf17 Resolves: #37342 Releases: 6.0 Reviewed-on: http://review.typo3.org/11347 Reviewed-by: Philipp Gampe Tested-by: Philipp Gampe Reviewed-by: Wouter Wolters Tested-by: Wouter Wolters Reviewed-by: Oliver Klee Tested-by: Oliver Klee Reviewed-by: Georg Ringer Tested-by: Georg Ringer
-
- 20 May, 2012 3 commits
-
-
Fix some CGL violations in /tests/ against rule "FunctionCallArgumentSpacingNoSpaceAfterComma". Change-Id: I5a35bf48de79d9f1a7945b2191b5be9bd94146c8 Resolves: #37319 Releases: 6.0 Reviewed-on: http://review.typo3.org/11317 Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn
-
Tolleiv Nietsch authored
Releates to #36784 which would have brought some basic tests. This patchset now has full coverage for the entire functionality of callUserFunction and #36784 can be reduced to its actual purpose. Change-Id: I02cfe3e963f90aa3c3986e57bdba4a08c6e4c0d5 Resolves: #37317 Releases: 6.0 Reviewed-on: http://review.typo3.org/11316 Reviewed-by: Philipp Gampe Tested-by: Philipp Gampe Reviewed-by: Susanne Moog Tested-by: Susanne Moog
-
Tolleiv Nietsch authored
Adds tests for htmlspecialchars_decode, deHSCentities, slashJS, rawUrlEncodeJS, rawUrlEncodeFP, strtoupper and strtolower. Change-Id: I1c68da9ac6bb187c1db559da03a2de6b20c4ab46 Resolves: #37315 Releases: 6.0 Reviewed-on: http://review.typo3.org/11315 Reviewed-by: Philipp Gampe Tested-by: Philipp Gampe Reviewed-by: Susanne Moog Tested-by: Susanne Moog
-
- 19 May, 2012 2 commits
-
-
Tolleiv Nietsch authored
Some of the most basic functions should be covered with unit tests. The change creates tests for inArray, array_merge, remapArrayKeys and keepItemsInArray. Change-Id: Id57148bc0d0418ed7308b9647c63af2d82ec94f2 Resolves: #37299 Releases: 6.0 Reviewed-on: http://review.typo3.org/11298 Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn Reviewed-by: Susanne Moog Tested-by: Susanne Moog
-
Tolleiv Nietsch authored
Some of the most basic functions should be covered with unit tests. Change-Id: If9466ebdf9d7177de298db14c5460cddfcc5cbe1 Resolves: #37297 Releases: 6.0 Reviewed-on: http://review.typo3.org/11296 Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn Reviewed-by: Susanne Moog Tested-by: Susanne Moog
-
- 13 May, 2012 1 commit
-
-
Some of the most basic functions should be covered with unit tests. The change creates tests for inList, expandList, rmFromList and uniqueList. Change-Id: I0fd1e47d7aec96e950b69b4c44898e55920ff4fd Resolves: #36968 Releases: 6.0 Reviewed-on: http://review.typo3.org/11089 Reviewed-by: Oliver Klee Tested-by: Oliver Klee Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn
-
- 05 May, 2012 1 commit
-
-
Christian Kuhn authored
FAL introduced first functional tests in a new tests/Functional directory. Therefore all unit tests are now moved to tests/Unit. Change-Id: Ied463e171b2dcaecf66cc9f6411de47b95b5bee7 Resolves: #36864 Releases: 6.0 Reviewed-on: http://review.typo3.org/11015 Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn
-
- 15 Apr, 2012 1 commit
-
-
Robert Heel authored
Reworked substUrlsInPlainText by using regex. Adding unittest. Change-Id: Ic5cc35546602e1d626f88f2cd64b9030f31780d6 Resolves: #28248 Releases: 4.5, 4.6, 4.7, 6.0 Reviewed-on: http://review.typo3.org/3383 Reviewed-by: Tolleiv Nietsch Tested-by: Tolleiv Nietsch
-
- 14 Apr, 2012 1 commit
-
-
Christian Kuhn authored
The method is scheduled for deletion in 6.0 but was still used in the core. The patch adapts the usages and removes intInRange. Change-Id: Id4724c566f61c5a7238ea29be6f385bdc99d8876 Resolves: #36029 Releases: 6.0 Reviewed-on: http://review.typo3.org/10454 Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn
-
- 13 Apr, 2012 1 commit
-
-
Christian Kuhn authored
Removes all deprecated methods and files that are unused in core and scheduled for deletion in 4.8 / 6.0. Some more complicated parts are left out for now. Change-Id: I03e236cedfbfa666d9b6f83848b11bb0977cdff0 Resolves: #35923 Releases: 6.0 Reviewed-on: http://review.typo3.org/10361 Reviewed-by: Georg Ringer Tested-by: Georg Ringer Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn
-
- 11 Apr, 2012 1 commit
-
-
Ingo Renner authored
When using t3lib_div::getUrl() with lib file/context it uses file_get_contents() to read a URL. When this fails it tries to provide the reason for the error but does not return the actual issue. The error key in the returned array contains the error retrieved by error_get_last() which does not provide the error that occurred with file_get_contents(), but with PHP. Usually this is a notice. The actual error message of file_get_contents() is in the variable $http_response_header which is available after calling file_get_contents(). See http://de2.php.net/manual/en/reserved.variables.httpresponseheader.php Change-Id: I6bb9ad7010a633f259da103f71f404592194f743 Fixes: #35847 Releases: 6.0, 4.7, 4.6, 4.5 Reviewed-on: http://review.typo3.org/10229 Reviewed-by: Oliver Klee Tested-by: Oliver Klee Reviewed-by: Andy Grunwald Tested-by: Andy Grunwald Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn Reviewed-by: Ingo Renner Tested-by: Ingo Renner
-
- 24 Mar, 2012 1 commit
-
-
Philipp Gampe authored
This happens for the mkdirSetsGroupOwnershipOfCreatedDirectory() test in t3lib_divTest. Solution, just skip the test if the function does not exists. Also do same safety check for posix_getegid() as done some tests above. Change-Id: I18cbebc0b22ae5a7318673ed8abd2bd01003ba57 Fixes: #33718 Releases: 6.0, 4.7 Reviewed-on: http://review.typo3.org/8867 Reviewed-by: Tolleiv Nietsch Tested-by: Tolleiv Nietsch Reviewed-by: Jigal van Hemert Tested-by: Jigal van Hemert
-
- 07 Mar, 2012 1 commit
-
-
Mario Rimann authored
Adds IDN support to t3lib_div's validating methods for email addresses and URLs. Change-Id: Iaff6d43c54ce4a2567b46acfe449e33b89136f8d Resolves: #30311 Releases: 4.8, 4.7, 4.6, 4.5 Reviewed-on: http://review.typo3.org/6907 Reviewed-by: Tolleiv Nietsch Tested-by: Tolleiv Nietsch
-
- 16 Feb, 2012 1 commit
-
-
Ingmar Schlecht authored
Add possibility to t3lib_div::array_merge_recursive_overrule() to unset values from the resulting array using special values __UNSET in the second array. Change-Id: Iab17d59b80c1e1070c8b2db6b318da0b01fda13c Resolves: #33941 Releases: 4.7 Reviewed-on: http://review.typo3.org/9026 Reviewed-by: Oliver Klee Reviewed-by: Tolleiv Nietsch Tested-by: Tolleiv Nietsch Reviewed-by: Susanne Moog Tested-by: Susanne Moog
-
- 25 Jan, 2012 1 commit
-
-
Loek Hilgersom authored
Added tests check if permissions and group ownership gets correctly set when creating directories, also when a whole path is created with mkdir_deep. These tests are created specifically for https://review.typo3.org/7022 Releases: 4.7, 4.6, 4.5 Change-Id: I1b09766525f66ea17fb7fcab05938c48c0ff9eba Reviewed-on: http://review.typo3.org/7156 Reviewed-by: Susanne Moog Tested-by: Susanne Moog
-
- 14 Jan, 2012 1 commit
-
-
Dmitry Dulepov authored
Function t3lib_div::validPathStr() fails on file names with Unicode characters. Adding 'u' modifier to the regular expression solves the problem. Change-Id: I9dfb31090d12133798f4e8d47e7394e6c7be51a6 Resolves: #32046 Releases: 4.7, 4.6, 4.5 Reviewed-on: http://review.typo3.org/7032 Reviewed-by: Oliver Klee Reviewed-by: Helmut Hummel Tested-by: Helmut Hummel Reviewed-by: Stefan Neufeind Reviewed-by: Tolleiv Nietsch Tested-by: Tolleiv Nietsch
-
- 24 Oct, 2011 1 commit
-
-
Restructure the code to use the most performant methods first if available. Take specialities of Windows OS and special PHP versions into account. Read/ generate more bytes than needed in one call, because it does not cost (much) more to generate more random bytes, but it's much cheaper for the next calls, because the bytes are already there. Resolves: #23355 Releases: 4.6, 4.5, 4.4 Change-Id: I6bad300842f3da40c620b3d79b8116345a2749a0 Reviewed-on: http://review.typo3.org/4537 Reviewed-by: Helmut Hummel Tested-by: Helmut Hummel Reviewed-by: Steffen Ritter Tested-by: Steffen Ritter Reviewed-by: Steffen Gebert Tested-by: Steffen Gebert
-
- 24 Aug, 2011 1 commit
-
-
At the moment the frontend option userFuncClassPrefix is also checked in various backend scenarios (for example the registry) and in general everywhere t3lib_div::hasValidPrefix is called. Therefore it should be a system option. Additionally to ensure "user_" is working as a prefix this was given hardcoded as additionalPrefix to the function in some cases. This patch streamlines the handling of prefixes, introduces a [SYS] option additionalAllowedClassPrefixes, deprecates the [FE] option and allows the prefixes 'tx_', 'Tx_', 'user_' and 'User_' by default. Change-Id: I70fa89120dbe8c7790e3d6de4b173b69beb8a6f9 Resolves: #29166 Releases: 4.6 Reviewed-on: http://review.typo3.org/4526 Reviewed-by: Philipp Gampe Tested-by: Philipp Gampe Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn
-
- 21 Aug, 2011 1 commit
-
-
Setting $GLOBALS['TYPO3_CONF_VARS']['FE']['userFuncClassPrefix'] to an empty string - to allow all prefixes - does not work as expected as the check in t3lib_div expects a valid string with length > 0. Adjust t3lib_div::hasValidClassPrefix to also allow empty prefix var. Change-Id: Idbd8cf7a547d9549f1c31dadd731eda48f52fcec Resolves: #29133 Releases: 4.6 Reviewed-on: http://review.typo3.org/4445 Reviewed-by: Philipp Gampe Tested-by: Philipp Gampe Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn
-
- 07 Aug, 2011 2 commits
-
-
Stefan Neufeind authored
* speedup by using IPv6-support from PHP if present * since there is IPv6Hex2Bin(), also add IPv6Bin2Hex() * since there is normalizeIPv6(), also add compressIPv6() * normalization also involves converting to lowercase * extend unit-tests Change-Id: I7c9eda4de0f2c06f06a530f1180233d592f9dfdc Resolves: #28669 Releases: 4.6, 4.7 Reviewed-on: http://review.typo3.org/4019 Reviewed-by: Andreas Wolf Tested-by: Andreas Wolf
-
Stefan Neufeind authored
Cleanup for an E_NOTICE on exploding the bitmask. Replaced (correct working, but "unreadable") strcmp(). Add testcases. Change-Id: I3836d3c53ab6093e3427047c4a5089778dd04ca2 Resolves: #27230 Releases: 4.3, 4.4, 4.5, 4.6 Reviewed-on: http://review.typo3.org/2536 Reviewed-by: Björn Pedersen Tested-by: Björn Pedersen Reviewed-by: Andreas Wolf Tested-by: Andreas Wolf
-
- 31 Jul, 2011 1 commit
-
-
Add checks for IPv4 and IPv6. Otherwise take input as hostname. Implement correct (recursive) wildcard-checks. Add unit tests. Change-Id: I721fb6d376ee9ef01352799dfad1813b38e87ded Resolves: #27217 Releases: 4.5, 4.6 Reviewed-on: http://review.typo3.org/2526 Reviewed-by: Philipp Gampe Tested-by: Philipp Gampe Reviewed-by: Xavier Perseguers Tested-by: Xavier Perseguers
-
- 24 Jul, 2011 1 commit
-
-
Bjoern Pedersen authored
The strict string comparison is not enough to catch all wrong arguments and throw a correct error. Change-Id: Id7911229f90d1aa0f6ce5830a434bceb4ab61da5 Resolves: #25047 Releases: 4.6 Reviewed-on: http://review.typo3.org/3446 Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn Reviewed-by: Susanne Moog Tested-by: Susanne Moog
-
- 12 Jul, 2011 1 commit
-
-
Stefan Neufeind authored
cmpIPv6 makes wrong assumptions about the output of IPv6Hex2Bin(). Also currently only netmasks of /48, /64 and /128 are supported. Added a cleanup for an E_NOTICE on exploding the bitmask. Replaced IPv6Hex2Bin() with php function (same output, just quicker). Added testcases. Change-Id: I816db2b9ce42d13f61ecd7f87406730c424de52f Resolves: #27210 Releases: 4.6, 4.5 Reviewed-on: http://review.typo3.org/2519 Reviewed-by: Stefan Neufeind Tested-by: Stefan Neufeind Reviewed-by: Xavier Perseguers Tested-by: Xavier Perseguers
-