-
Notifications
You must be signed in to change notification settings - Fork 415
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from ivanakimov/develop
Remove BC Math Requirement
- Loading branch information
Showing
7 changed files
with
121 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Hashids. | ||
* | ||
* (c) Ivan Akimov <ivan@barreleye.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Hashids\Tests; | ||
|
||
use Hashids\Math; | ||
use PHPUnit\Framework\TestCase; | ||
use RuntimeException; | ||
|
||
/** | ||
* This is the runtime exception test class. | ||
* | ||
* @author Vincent Klaiber <hello@vinkla.com> | ||
*/ | ||
class RuntimeExceptionTest extends TestCase | ||
{ | ||
public function testAdd() | ||
{ | ||
$this->expectException(RuntimeException::class); | ||
|
||
Math::add(1, 2); | ||
} | ||
|
||
public function testMultiply() | ||
{ | ||
$this->expectException(RuntimeException::class); | ||
|
||
Math::multiply(1, 2); | ||
} | ||
|
||
public function testDivide() | ||
{ | ||
$this->expectException(RuntimeException::class); | ||
|
||
Math::divide(1, 2); | ||
} | ||
|
||
public function testGreaterThan() | ||
{ | ||
$this->expectException(RuntimeException::class); | ||
|
||
Math::greaterThan('1', '2'); | ||
} | ||
|
||
public function testMod() | ||
{ | ||
$this->expectException(RuntimeException::class); | ||
|
||
Math::mod('1', '2'); | ||
} | ||
} |