mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-11 22:38:42 +00:00
Fix unit test bugs
This commit is contained in:
parent
d5fd2c4827
commit
2ec800fe62
|
|
@ -318,13 +318,13 @@ class Money implements \Serializable
|
||||||
/**
|
/**
|
||||||
* Searialze.
|
* Searialze.
|
||||||
*
|
*
|
||||||
* @return int
|
* @return string
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function serialize() : string
|
public function serialize() : string
|
||||||
{
|
{
|
||||||
return $this->getInt();
|
return (string) $this->getInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -338,7 +338,7 @@ class Money implements \Serializable
|
||||||
*/
|
*/
|
||||||
public function unserialize($value) : void
|
public function unserialize($value) : void
|
||||||
{
|
{
|
||||||
$this->setInt($value);
|
$this->setInt((int) $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -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
|
* @expectedException \OutOfRangeException
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user