Skip to content

Commit d7d5622

Browse files
committed
Adding failing test
1 parent a18b1fe commit d7d5622

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

generator/tests/GeneratedFilesTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,20 @@ public function testStrtotime()
102102

103103
$this->assertSame(\strtotime('+1 day'), strtotime('+1 day'));
104104
}
105+
106+
/**
107+
* Tests that parameters signature can be not passed. See https://github.com/thecodingmachine/safe/issues/86
108+
*/
109+
public function testOpenSslSign()
110+
{
111+
require_once __DIR__.'/../../generated/openssl.php';
112+
require_once __DIR__.'/../../lib/Exceptions/SafeExceptionInterface.php';
113+
require_once __DIR__.'/../../lib/Exceptions/AbstractSafeException.php';
114+
require_once __DIR__.'/../../generated/Exceptions/OpensslException.php';
115+
116+
\openssl_sign('foo', $signature, file_get_contents(__DIR__.'/fixtures/id_rsa'));
117+
openssl_sign('foo', $signatureSafe, file_get_contents(__DIR__.'/fixtures/id_rsa'));
118+
119+
$this->assertSame($signature, $signatureSafe);
120+
}
105121
}

0 commit comments

Comments
 (0)