mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
fix tests
This commit is contained in:
parent
8fd2cca24b
commit
fdcf1645f2
|
|
@ -461,7 +461,7 @@ final class ReadMapper extends DataMapperAbstract
|
|||
return 0;
|
||||
}
|
||||
|
||||
return \stripos($result, '.') ? (float) $result : (int) $result;
|
||||
return \stripos($result, '.') === false ? (int) $result : (float) $result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -386,7 +386,7 @@ final class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase
|
|||
public function testRandom() : void
|
||||
{
|
||||
$id = BaseModelMapper::create()->execute($this->model);
|
||||
self::assertEquals($id, BaseModelMApper::getRandom()->execute()->id);
|
||||
self::assertEquals($id, BaseModelMApper::getRandom()->limit(1)->execute()->id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user