Koji Tanaka
831bfe9315
test: In ConfigureTest::testBootstrap(), set error handler, so add cleanup.
...
This is because PHPUnit error handlers cannot catch PHP errors in tests that run after DebuggerTest if they expect them to occur and break the test process.
2023-01-11 22:45:29 +01:00
Koji Tanaka
5ae08a4dba
fixed: CakeFixtureManager::_setupTable() is called outside of transaction
...
Fixed PDOException thrown with the message "There is no active transaction" in PHP 8.0+.
SQL like CREATE/DROP/TRUNCATE TABLE implicitly commits just before.
In PHP 8.0+, calling commit/rollback afterwards will now throw a PDOException.
2023-01-11 22:45:29 +01:00
Koji Tanaka
b1229c9107
test: Removed pre-checking of tests that were skipped in the PHPUnit version since the minimum version is now 9.5.
2023-01-11 22:45:29 +01:00
Koji Tanaka
a1ed2f91b3
test: Remove expectError() and expectException()
...
These are incompatible signature with the PHPUnit 9 method of the same name.
2023-01-11 22:45:29 +01:00
Koji Tanaka
a95654de88
clean: Stop overriding TestCase::run().
...
Overriding the run method to perform fixture management processing is no longer necessary since moved it to CakeFixtureInjector.
Co-authored-by: Kenshin Okinaka <okinakak@yahoo.co.jp>
2023-01-11 22:45:29 +01:00
Koji Tanaka
75716f76bc
test: Add return type declarations to overridden methods of TestCase classes.
2023-01-11 22:45:29 +01:00
Koji Tanaka
0692ce5b62
test: Updated TestSuite class for PHPUnit 9.5
2023-01-11 22:45:29 +01:00
Koji Tanaka
aac44b074b
build: Added GitHub Actions workflow to run phpcs.
2023-01-11 22:45:29 +01:00
Koji Tanaka
bd633c023a
feat: Implement a fixture callback class using the PHPUnit TestListener interface.
2023-01-11 22:45:29 +01:00
Koji Tanaka
72079a54e6
build: add CakePHP2 tests bootstrap files
2023-01-11 22:45:29 +01:00
chrip
dbb77bf125
Fix wrong line ending in email header when using MailTransport.
2022-10-20 22:35:02 +02:00
Markus Bauer
a139699e7e
Include new "full_path" field in security hash as of PHP 8.1
2022-10-08 12:05:45 +02:00
Markus Bauer
ef8fee29b2
Fix schema migration that creates multiple UNIQUE indexes at once ( #18 )
...
* Fix schema migration that creates multiple UNIQUE indexes at once
* Add to changelog
Co-authored-by: Markus Bauer <markus.bauer@cispa.saarland>
2022-09-27 21:41:08 +02:00
Kamil Wylegala
a5a0ccd551
Fixed passing arguments to invokeArgs when resolving controller's action.
2022-03-08 19:55:03 +01:00
Albert Peschar
2121cdc43c
Remove String class
2022-03-03 10:27:13 +02:00
Albert Peschar
60e28a1e3e
Handle error suppression in ConsoleErrorHandler
2022-03-02 15:58:32 +02:00
Albert Peschar
d9247a0832
Use array_values to avoid named parameters error
2022-01-31 17:02:07 +00:00
José Muñoz
3719cce178
runCommand $command as string
...
Sets typehint for runCommand argument as string.
Fixes original default behavior to send string $command rather than null.
2022-01-16 07:47:57 -07:00
Kamil Wylegala
7302598222
Fixed deprecation notice: numeric prefix cannot be null in http_build_query.
2022-01-04 23:08:45 +01:00
Kamil Wylegala
b9630655d8
Fixed deprecation notice strupper in DboSource
2022-01-04 18:49:06 +01:00
Kamil Wylegala
08f228f02a
Fixed deprecation notice about 'preg_match(): Passing null to parameter #2 () of type string is deprecated'
2022-01-04 17:16:07 +01:00
Kamil Wylegala
ef0e0a7175
Fixed: "strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated"
2022-01-04 16:55:02 +01:00
Kamil Wylegala
d83997f849
Fixed 'Automatic conversion of false to array is deprecated'.
2022-01-04 16:45:09 +01:00
Kamil Wylegala
ad33741e0d
Fixed deprecation notice in PHP 8.1: Countable #3
2021-12-20 23:23:30 +01:00
Kamil Wylegala
bd3aac5001
Fixed deprecation notice in PHP 8.1: IteratorAggregate
2021-12-20 23:20:05 +01:00
Kamil Wylegala
61e4ef05c8
Fixed implementations of ArrayAccess to reduce deprecation notices in PHP 8.1 #1
2021-12-20 23:09:51 +01:00
Kamil Wylegala
20419bd82b
PHP8: ErrorHandler fixed accordingly to migration guide.
2021-02-24 23:08:03 +01:00
Mark Story
cf14e6546e
Bump version
2020-12-15 21:47:53 -05:00
Mark Story
1c27b82b49
Merge pull request #15181 from cakephp/fix-15163
...
Fix incorrect URL generation
2020-11-30 10:38:21 -05:00
Mark Story
f89e145917
Fix lint error.
2020-11-27 10:31:33 -05:00
Mark Story
63d708118a
Fix incorrect URL generation
...
When a fullBaseURL is being used we should check for the exact base
string being a prefix and not just the string length as it could be full
of garbage.
Fixes #15163
2020-11-19 22:47:52 -05:00
Markus Podar
d201312a0e
php-8.0-compat: fix "Error: Unknown named parameter $subject"
...
PHP 8 added support for named parameters however will throw an error when
a named parameter, which does not exist, will be called/appears.
In this case the code uses `array_filter(compact('subject))` to conveniently
prepend `$subject` to the callback, if it's non-null.
It's then combined with `$params` but mixing a hash wih a sequential array
and then end result is `['subject' => …, ]` which then triggers this
TypeError in PHP 8.
The solution applies `array_values()` on above array as to remove the keys
and then the error disappears.
With this change, our internal test suite (2k tests) is green on both PHP8
and PHP7.4, aka this change is expecte to be backwards compatible.
2020-11-12 17:30:04 +01:00
Mark Story
89e23927cd
Merge pull request #15087 from martinstuecklschwaiger/2.x
...
Make TestShell compatible with PHP 7.4
2020-10-21 17:23:14 -04:00
Martin Stuecklschwaiger
bb58933691
Make TestShell compatible with PHP 7.4
2020-10-21 17:48:23 +00:00
Henrik Gemal
3f0d42502d
add fo-fo
2020-09-01 13:28:14 +02:00
mark_story
931d3a8626
Fix SchemaShell configuration change.
...
Comparisons are done with === true. This fixes the set operation.
Fixes #14720
2020-06-18 21:13:41 -04:00
Jeremy Ruten
e90e4716ec
Fix deprecated argument order in calls to implode()
2020-06-17 11:44:23 -06:00
mark_story
d0c51b3742
Update version number to 2.10.22
2020-06-06 22:16:36 -04:00
andrii-pukhalevych
8addcf1fa3
Microoptimization for ServerRequest::is() and ServerRequest::isAll() ( #14654 )
2020-05-31 22:43:58 +05:30
othercorey
01d5d039f3
Use random_int with PHP 7
2020-05-23 11:12:46 -05:00
Richard van den Berg
63c01dfbab
Generate truly random uuid()
2020-05-23 15:38:41 +02:00
Val Bancer
2d4f80bf66
Improve php doc block in HtmlHelper.php
2020-05-22 13:48:26 +02:00
mark_story
ab7eb46f20
Update version number to 2.10.21
2020-05-17 20:31:14 -04:00
Jakub Onderka
fc3b50c523
Fix argument order for implode method
...
Different order is deprecated and will cause fatal error in PHP8
2020-04-27 16:08:52 +02:00
Val Bancer
b957faa39c
Fix invalid data type
2020-04-21 11:32:16 +02:00
Mark Story
50e0ca7f9d
Add TLS 1.3 support to CakeSocket
...
Fixes #14422
2020-04-05 00:25:09 -04:00
Markus Podar
459ee900fe
php-7.4-compact: replace deprecated curly brace offset access
...
Per https://wiki.php.net/rfc/deprecate_curly_braces_array_access and https://www.php.net/manual/en/migration74.deprecated.php
> The array and string offset access syntax using curly braces is deprecated. Use $var[$idx] instead of $var{$idx}.
2020-03-20 21:10:58 +01:00
mark_story
1ea6732e40
Update version number to 2.10.20
2020-01-16 20:56:03 -05:00
Mark Story
13fba738f7
Merge pull request #13984 from othercorey/2.x-phpunit-warnings
...
2.x - Updated CakeTestSuiteCommand::run() exit logic to match phpunit's
2019-12-06 10:14:14 -05:00
Val Bancer
c59f021c4e
Improve doc block
2019-12-06 10:41:45 +01:00
Corey Taylor
eda72a6f3b
Updated CakeTestSuiteCommand::run() exit logic to match phpunit's behavior now that doRun() is called with =false.
2019-12-06 01:15:11 -06:00
Edgaras Janušauskas
49bbc21e1d
Fix failures on PHP 7.4. Run phpcs on PHP 7.0
2019-12-05 15:11:35 +02:00
Pascal Woerde
2affcdfb00
Fix duplicate session_set_save_handler call from handler instantiation.
2019-11-26 13:39:22 +01:00
Gerson Felipe Schwinn
cf49efdf0e
Solving headers already sent bug on sessions whit phpunit.phar
2019-09-26 09:00:11 -03:00
Milan van As
64700e9a08
Fix loading ShellHelpers from plugins
...
Previously the Shell::helper() function would call a `class_exists` on a variable that contained the `Plugin.ClassName` notation which will always result be false, e.g. `class_exists('YourPlugin.TestShellHelper')` will always be false. Loading ShellHelpers from a plugin will never work because of this. (This notation is described in the ShellHelper 2.x documentation).
After the pluginSplit and the loading of the actual ShellHelper class file (through `App::uses`), the `class_exists` should be called on the real class name, not on `Plugin.ClassName`.
Through this fix, plugins with an ExampleShellHelper in placed in MyPlugin/Console/Helper/ExampleShellHelper.php can be called in Shells by `$this->helper('MyPlugin.ExampleShellHelper')` and plugins within your app can still be loaded through the regular `$this->helper('MyShellHelper')`.
2019-09-04 14:56:12 +02:00
Mark van Driel
142c19c557
Fix for: Empty post body for json will put null value in request->data
2019-08-19 15:00:19 +02:00
Mark van Driel
d4c351563e
Test to prove issue with empty body for json
2019-08-19 14:52:46 +02:00
Gareth Ellis
dba84d65d7
Corrects style error from PHPCS by prefixing method name with an underscore
2019-07-29 15:27:45 +01:00
Gareth Ellis
f198ffdb9c
Moves creation of ControllerTestDispatcher to its own protected method
2019-07-29 10:35:43 +01:00
mark_story
8f08a83474
Update version number to 2.10.19
2019-07-24 21:32:25 -04:00
mark_story
85eb25e8b5
Add missing App::uses()
...
Fixes #13083
2019-06-19 21:52:57 -04:00
Koji Tanaka
d09e827f6c
Pass $exit arguments to the parent doRun() method and $exit is false
2019-06-01 22:59:30 +09:00
mark_story
00aec4b4f5
Update version number to 2.10.18
2019-05-13 22:28:47 -04:00
Mark Story
3522378925
Merge pull request #13198 from bancer/2.x-docs
...
Improve doc block
2019-05-06 11:12:38 -04:00
bancer
7e1fef4066
Improve doc block
2019-05-06 14:21:24 +02:00
Mark Sch
9270d4759b
Merge pull request #13171 from bancer/2.x-docs
...
Improved doc block
2019-04-29 14:30:49 +02:00
bancer
928f586599
Improved doc block
2019-04-29 10:40:10 +02:00
Koji Tanaka
cf39119151
In PHP 7.3+, call the built-in function mb_strtoupper() to skip failed tests
2019-04-28 21:00:45 +09:00
mark_story
4d0a209033
Fix shutdown warnings in PHP7.2+
...
Check if the current file is valid before re-using it. This fixes
warnings emitted during process shutdown when DboSource is persisting
the method cache.
Fixes #13085
2019-04-16 21:23:58 -04:00
mark_story
d954e96671
Update version number to 2.10.17
2019-04-13 22:17:43 -04:00
Mark Story
3d216935c9
Merge pull request #13054 from savedario/2.x
...
FormHelper does not respect passed 'escape' option for errors
2019-03-30 21:38:41 -04:00
Mark Story
8ff719de66
Merge pull request #13058 from bancer/2.x-use-trans-session-id
...
Add extra unit tests
2019-03-30 21:36:13 -04:00
Mark Sch
b8cefad8c5
Merge pull request #13060 from hgsgtk/2.x-fix-phpdoc
...
fix phpdoc at HtmlHelper::link
2019-03-19 08:47:55 +01:00
Kazuki Higashiguchi
e472a85ab2
fix phpdoc at HtmlHelper::link
2019-03-19 12:03:33 +09:00
bancer
4db38f26ca
Improve unit test
2019-03-18 12:43:26 +01:00
bancer
ec3abd9089
Add extra test to AllControllerTest
2019-03-18 11:58:42 +01:00
bancer
2fe0af9fa9
Improve docs
2019-03-18 11:52:35 +01:00
bancer
534d9362e4
Add extra unit tests
2019-03-18 11:50:13 +01:00
Dario Savella
cf5577234f
PHPCS typos fixed
2019-03-15 18:50:26 +01:00
Dario Savella
08d11154a7
Changes reverted. Added 2 tests of error-related options
2019-03-15 17:41:29 +01:00
Dario Savella
5ba9e41df8
Form helper did not respect passed FormHelper::inputDefaults()
2019-03-15 10:39:52 +01:00
Gareth Ellis
c14782305b
Separates derivation of conditions for cascaded deletion of HABTM records to a protected method #13046
2019-03-14 10:28:59 +00:00
mark_story
c4a51509c5
Update version number to 2.10.16
2019-02-28 21:45:41 -05:00
Mark Story
d054d536ab
Merge pull request #13010 from bancer/2.x-config
...
Use CONFIG constant
2019-02-23 16:50:54 -09:00
Benjamin Stout
71f5133a86
Use strict comparison instead of function call - #13001
2019-02-21 11:44:38 -08:00
bancer
3f909e9a00
Define CONFIG constant
2019-02-21 17:18:15 +01:00
bancer
8a724bb698
Use CONFIG constant
2019-02-21 16:54:07 +01:00
Benjamin Stout
0cc3509b74
Prevent attempting to close an uninitialized Redis instance (issue #13001 )
2019-02-19 18:21:44 -08:00
Benjamin Stout
d486e1ca9e
Wrap index reference in empty() check - closes cakephp#13001
2019-02-19 16:32:25 -08:00
bancer
63bbd4cd7b
Fix queryString documentation
2019-02-07 14:23:56 +01:00
Mark Story
c5229c2037
Merge pull request #12913 from bancer/2.x
...
Add unit test for timezone conversion
2019-01-31 22:20:11 -05:00
bancer
bb20b4f419
Change private method to protected
2019-01-31 09:49:41 +01:00
bancer
e94183c6d8
Give a better name to a new function
2019-01-29 09:16:48 +01:00
mark_story
7da7a9fab4
Update version number to 2.10.15
2019-01-25 21:41:55 -05:00
bancer
ec5bac5e52
Fix timezone adjustment in CakeTime::nice and CakeTime::niceShort
2019-01-25 13:56:50 +01:00
bancer
e845e8876d
Add unit test
2019-01-25 13:04:41 +01:00
bancer
c855ef874b
Simplify i18nFormat
2019-01-25 12:25:26 +01:00
bancer
009d69b3f7
Fix code style errors
2019-01-25 12:21:34 +01:00
bancer
044e8f24af
Fix timezone conversion
2019-01-25 12:05:44 +01:00
bancer
7911bb9052
Remove unnecessary timezone offset manipulation
2019-01-24 15:43:11 +01:00