diff --git a/Localization/Money.php b/Localization/Money.php index 34b1878af..59bddc09c 100644 --- a/Localization/Money.php +++ b/Localization/Money.php @@ -318,13 +318,13 @@ class Money implements \Serializable /** * Searialze. * - * @return int + * @return string * * @since 1.0.0 */ public function serialize() : string { - return $this->getInt(); + return (string) $this->getInt(); } /** @@ -338,7 +338,7 @@ class Money implements \Serializable */ public function unserialize($value) : void { - $this->setInt($value); + $this->setInt((int) $value); } /** diff --git a/tests/Message/Http/RequestTest.php b/tests/Message/Http/RequestTest.php index 73535b70d..adbdfae4f 100644 --- a/tests/Message/Http/RequestTest.php +++ b/tests/Message/Http/RequestTest.php @@ -122,15 +122,6 @@ class RequestTest extends \PHPUnit\Framework\TestCase ); } - /** - * @expectedException \phpOMS\Stdlib\Base\Exception\InvalidEnumValue - */ - public function testInvalidRequestSource() - { - $request = new Request(new Http('http://www.google.com/test/path')); - $request->setRequestSource(999); - } - /** * @expectedException \OutOfRangeException */