Skip to content

Commit

Permalink
Update exception inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
webeweb committed Jul 5, 2019
1 parent 82c935d commit 2919b84
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
CHANGELOG
=========

### [1.3.1](https://github.com/webeweb/haveibeenpwned-library/tree/v1.3.1) (2019-07-05)

- Update exception inheritance

### [1.3.0](https://github.com/webeweb/haveibeenpwned-library/tree/v1.3.0) (2019-06-08)

- Change license
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/AbstractException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace WBW\Library\HaveIBeenPwned\Exception;

use Exception;
use WBW\Library\Core\Exception\AbstractCoreException;
use WBW\Library\Core\Exception\AbstractCoreException as BaseException;

/**
* Abstract exception.
Expand All @@ -21,7 +21,7 @@
* @package WBW\Library\HaveIBeenPwned\Exception
* @abstract
*/
abstract class AbstractException extends AbstractCoreException {
abstract class AbstractException extends BaseException {

/**
* Constructor.
Expand Down
6 changes: 3 additions & 3 deletions tests/Exception/APIExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ class APIExceptionTest extends AbstractTestCase {
public function testConstruct() {

// Set an Exception mock.
$arg = new Exception;
$throwable = new Exception;

$obj = new APIException("message", $arg);
$obj = new APIException("message", $throwable);

$this->assertEquals("message", $obj->getMessage());
$this->assertSame($arg, $obj->getPrevious());
$this->assertSame($throwable, $obj->getPrevious());
}
}

0 comments on commit 2919b84

Please sign in to comment.