init
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
require_once __DIR__ . "/../vendor/autoload.php";
|
||||
|
||||
class ApiTest extends \PHPUnit\Framework\TestCase {
|
||||
public function test_should_instatiate_with_valid_curve_secp256k1() {
|
||||
$ec = new \Elliptic\EC('secp256k1');
|
||||
|
||||
$this->assertNotNull($ec);
|
||||
$this->assertInstanceOf(\Elliptic\EC::class, $ec);
|
||||
}
|
||||
|
||||
|
||||
public function test_should_throw_error_with_invalid_curve() {
|
||||
$this->expectException(\Exception::class);
|
||||
$ec = new \Elliptic\EC('nonexistent-curve');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user