Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed May 13, 2023
1 parent 8a0fda0 commit bda23aa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/Handler/CurlFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,29 +226,29 @@ public function testValidatesCryptoMethodInvalidMethod()
$f = new Handler\CurlFactory(3);

$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('SSL certificate not found: /does/not/exist');
$this->expectExceptionMessage('An invalid `crypto_method` value was supplied.');
$f->create(new Psr7\Request('GET', Server::$url), ['crypto_method' => 123]);
}

public function testAddsCryptoMethodTls10()
{
$f = new Handler\CurlFactory(3);
$f->create(new Psr7\Request('GET', Server::$url), ['crypto_method' => \STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT]);
self::assertEquals(__FILE__, $_SERVER['_curl'][\CURL_SSLVERSION_TLSv1_0]);
self::assertEquals(\CURL_SSLVERSION_TLSv1_0, $_SERVER['_curl']['crypto_method']);
}

public function testAddsCryptoMethodTls11()
{
$f = new Handler\CurlFactory(3);
$f->create(new Psr7\Request('GET', Server::$url), ['crypto_method' => \STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT]);
self::assertEquals(__FILE__, $_SERVER['_curl'][\CURL_SSLVERSION_TLSv1_1]);
self::assertEquals(\CURL_SSLVERSION_TLSv1_1, $_SERVER['_curl']['crypto_method']);
}

public function testAddsCryptoMethodTls12()
{
$f = new Handler\CurlFactory(3);
$f->create(new Psr7\Request('GET', Server::$url), ['crypto_method' => \STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT]);
self::assertEquals(__FILE__, $_SERVER['_curl'][\CURL_SSLVERSION_TLSv1_2]);
self::assertEquals(\CURL_SSLVERSION_TLSv1_2, $_SERVER['_curl']['crypto_method']);
}

/**
Expand All @@ -258,7 +258,7 @@ public function testAddsCryptoMethodTls13()
{
$f = new Handler\CurlFactory(3);
$f->create(new Psr7\Request('GET', Server::$url), ['crypto_method' => \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT]);
self::assertEquals(__FILE__, $_SERVER['_curl'][\CURL_SSLVERSION_TLSv1_3]);
self::assertEquals(\CURL_SSLVERSION_TLSv1_3, $_SERVER['_curl']['crypto_method']);
}

public function testValidatesSslKey()
Expand Down

0 comments on commit bda23aa

Please sign in to comment.