Skip to content

Commit

Permalink
uses TestCase::skipIf() to reduce code and bring it to top
Browse files Browse the repository at this point in the history
  • Loading branch information
TheFRedFox committed May 30, 2016
1 parent ef802cd commit 1a2ccba
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/TestCase/Network/Http/Auth/OauthTest.php
Expand Up @@ -298,19 +298,15 @@ public function testRsaSigningWithPassphraseString()
*/
public function testRsaSigningWithPassphraseFile()
{
$this->skipIf(PHP_EOL != "\n", 'Just the line ending "\n" is supported. You can run the test again e.g. on a linux system.');

$request = new Request();
$request->url('http://photos.example.net/photos')
->body([
'file' => 'vacaction.jpg',
'size' => 'original'
]);
$privateKeyPath = TEST_APP . DS . 'config' . DS . 'key_with_passphrase.pem';

if (PHP_EOL != "\n") {
$this->markTestSkipped('Just the line ending ("\n") is supported. You can run the test again e.g. on a linux system.');
return;
}

$passphrasePath = TEST_APP . DS . 'config' . DS . 'key_passphrase_lf';
$passphrase = fopen($passphrasePath, 'r');

Expand Down

0 comments on commit 1a2ccba

Please sign in to comment.