Commit graph

121 commits

Author SHA1 Message Date
Koji Tanaka
b1417587ad test: Replace deprecated @expectedException* to $this->expectException*() 2023-01-11 22:45:29 +01:00
Koji Tanaka
dfc1c56625 test: Replace assertContains() with assertStringContainsString() for text assertion.
assertContains() can no longer be used for text containment assertion.
2023-01-11 22:45:29 +01:00
Koji Tanaka
883ce8041e test: Replace deprecated assertRegExp() with assertMatchesRegularExpression().
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
mark_story
a13abcf97b Fix tests. 2019-01-16 21:53:42 -05:00
Marc Würth
1ce2389069 Fix broken tests 2017-06-11 01:02:49 +02:00
Marc Würth
d03a682eeb Use HTTPS for the bakery.cakephp.org URL 2017-06-11 00:27:59 +02:00
Marc Würth
da8414e13b Use HTTPS for the opensource.org MIT license URL 2017-06-11 00:23:22 +02:00
Marc Würth
04efc7ba50 Use HTTPS for the book.cakephp.org URL 2017-06-11 00:15:36 +02:00
Marc Würth
10b89b51a9 Use HTTPS for the cakefoundation.org URL 2017-06-11 00:10:59 +02:00
Marc Würth
17314baa15 Use HTTPS for the cakephp.org URL 2017-06-10 23:40:28 +02:00
mark_story
fa68c93c2d Fix failing test.
This test merges config funny.
2017-04-06 10:08:17 -04:00
mark_story
9d94487b23 Fix PHPCS
Refs MATES-9698
2016-11-04 09:31:05 -04:00
mark_story
6a201696dd Fix HttpSocket emitting errors when nameless cookies are encountered.
Refs #9698
2016-11-03 19:07:25 -04:00
mark_story
e8d63725d8 Merge branch '2.x' into 2.next 2016-09-04 23:54:22 -04:00
Marc Würth
f2638b3e38 Remove superfluous "Class" from doc blocks 2016-08-10 12:22:09 +02:00
mark_story
12c6fd4e22 Merge branch '2.x' into 2.next 2016-05-02 21:58:41 -04:00
mark_story
f451efa511 Attempt to fix tests in 2.x
Relying on tv.eurosport.com having a bad peer name is pretty fragile.
However, we can more easily rely on their cert coming from a CA we no
longer trust.
2016-04-14 15:28:34 -04:00
mscherer
dda9e83ab6 Refactor Object to CakeObject for future PHP7 comp. 2016-04-08 14:33:26 +02:00
mark_story
1a170e1eec Fix parsing empty header values.
Replace the complex and somewhat unfixable regexp based parser for
a parser that handles each line individually. Normalize multi-line
headers to replace multiple spaces with a single one. Section 4.2 of the
HTTP1.1 standard states

> Any LWS that occurs between field-content MAY be replaced with
> a single SP before interpreting the field value or forwarding the
> message downstream.

This makes me somewhat confident that we can safely normalize
multi-line HTTP header values.

Refs #8330
2016-02-24 22:25:58 -05:00
Richard van den Berg
2d178b7e10 PHPCS fixes 2015-12-15 19:58:11 +01:00
Richard van den Berg
e47b26aa6b Do not redefine TestHttpSocket 2015-12-15 16:58:12 +01:00
Richard van den Berg
077f157adf Test case for proxy authentication when request is HTTPS 2015-12-12 11:13:41 +01:00
mark_story
cc3531d288 Move SSL context options into CakeSocket.
Having all the options consolidated in one places enables all the SSL
context options to be used in the SmtpTransport instead of just allowing
self_signed as proposed in #7496
2015-10-12 21:56:20 -04:00
Marc Würth
1ede742d92 Various improvements to the CakePHP test files
Mostly CS, doc blocks and unused variables.
2015-09-25 17:22:00 +02:00
mark_story
58ea40e32c Don't stop reading when only a '0' has been read.
Make tests simpler by using onConsecutiveCalls() instead of trying to
maintain mock method indexes.

Refs #7121
2015-07-27 22:40:27 -04:00
Richard van den Berg
1d0d20e974 Account for SNI changes in HttpSocketTest 2015-03-23 22:31:08 -04:00
mark_story
543f05e3d0 Merge branch 'master' into 2.6 2014-11-29 22:00:00 -05:00
mark_story
1e6d22b8cb Make the version option function as intended.
The version option is documented but does not work. While this 'breaks'
behavior, it also fixes what I think is a more important issue.

Refs #5234
2014-11-24 22:38:00 -05:00
mark_story
8cbf975943 Gracefully handle invalid chunks in HttpSocket
When invalid chunks are detected we should assume the server is
incorrect and handle the remaining content as a single large chunk.

Refs #5140
2014-11-17 22:23:46 -05:00
mark_story
0e4fb9d648 Merge branch 'master' into 2.6 2014-11-07 15:13:46 -05:00
mark_story
6aaac6b7e2 Fix HttpSocket mishandling encoded URIs
The HTTP specs seem to indicate that the Location header should contain
an 'absoluteURI' which includes encoded data. In order to avoid
a regression with the issue fixed in b9ee4fc9f1
we'll continue to replace `%2F` and no longer decode the entire URI.

Fixes #5076
2014-11-05 22:18:48 -05:00
mark_story
7c316bbc56 Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/basics.php
2014-08-30 21:28:11 -04:00
Jeremy Harris
8f420d74fa HttpSocket: not overwriting auth header if it is set in request configuration 2014-08-21 11:24:10 -05:00
mark_story
0d14bf7cc8 Update doc blocks.
There were a few trailing comments in #3706 that have now been
addressed.
2014-07-20 22:00:07 -04:00
Mark Story
7ef7ce2dbb Merge pull request #3706 from MelvinRoss/httpsocketheader
Add support for specifying protocol in Cakesocket/HttpSocket.  Add HEAD function to HttpSocket
2014-07-20 21:58:37 -04:00
Melvin Ross
09a7020119 Fix spacing to conform to coding standards 2014-07-14 14:54:26 -05:00
Melvin Ross
0eaf650d9f Test for new HEAD function inside HttpSocket 2014-07-14 14:34:27 -05:00
euromark
974ca851c2 Correct doc blocks according to cs guidelines.
Remove superfluous empty lines.
2014-07-03 15:36:42 +02:00
Melvin Ross
ad4dbdcee5 Fix HttpSocket test to actually reset protocols for correct test. Modify HttpSocket so that Https with non-passed in protocol doesn't set it to tcp and fail test. 2014-06-12 09:37:03 -05:00
Melvin Ross
86923e3593 Modify CakeSocket and HttpSocket so that the "protocol" parameter can be used to specify which protocol to use for creating sockets. These are protcols in the php "[a-z]://" wrapper sense. I also modified the test for these two files respectively to accomodate these new changes.
Unrelated to this bug, I added a "head" function inside of HttpSocket to go along with the GET/POST/PUT/DELETE/PATCH combination that's already present. Came in handy for me for deciding if I wanted to hit a resource with HttpSocket or not.
2014-06-11 19:04:58 -05:00
Stefan Dickmann
91907b5c6c correct docblock
invalid certificate domain
2014-06-01 13:23:47 +02:00
mark_story
15f63e9c81 Removing peer verification failure test.
Since we are not running a domain with an invalid certificate relying on
someone else to do that is quite unreliable.
2014-05-31 21:51:03 -04:00
mark_story
270e8774e4 Fix incorrect status line parsing in HttpSocketResponse.
Allow for multi-word status reasons.

Closes #3545
2014-05-21 21:53:18 -04:00
Jose Lorenzo Rodriguez
343d3279b9 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/Test/Case/Utility/FileTest.php
	lib/Cake/VERSION.txt
2014-04-06 21:50:41 +02:00
euromark
44952b06a4 cs 2014-04-02 02:23:43 +02:00
mark_story
afc8587949 Merge branch 'master' into 2.5 2014-03-18 22:12:14 -04:00
mark_story
9888209e9a Add tests and fix issues with multiple trailing whitespaces.
Closes #3016
2014-03-17 13:08:46 -04:00
mark_story
6c3bc48ce0 Merge branch 'master' into 2.5 2014-03-06 17:45:00 -05:00
ndm2
008ad3237c Fix verification of expected invocations #2919 2014-03-01 19:06:17 +01:00