mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
stupid changes
This commit is contained in:
parent
fb3988e72c
commit
a74d2e8a97
|
|
@ -231,7 +231,7 @@ final class FileCache extends ConnectionAbstract
|
||||||
} elseif ($type === CacheValueType::_ARRAY) {
|
} elseif ($type === CacheValueType::_ARRAY) {
|
||||||
return (string) \json_encode($value);
|
return (string) \json_encode($value);
|
||||||
} elseif ($type === CacheValueType::_SERIALIZABLE) {
|
} elseif ($type === CacheValueType::_SERIALIZABLE) {
|
||||||
return \get_class($value) . self::DELIM . $value->serialize();
|
return \get_class($value) . self::DELIM . $value->__serialize();
|
||||||
} elseif ($type === CacheValueType::_JSONSERIALIZABLE) {
|
} elseif ($type === CacheValueType::_JSONSERIALIZABLE) {
|
||||||
return \get_class($value) . self::DELIM . ((string) \json_encode($value->jsonSerialize()));
|
return \get_class($value) . self::DELIM . ((string) \json_encode($value->jsonSerialize()));
|
||||||
} elseif ($type === CacheValueType::_NULL) {
|
} elseif ($type === CacheValueType::_NULL) {
|
||||||
|
|
@ -351,7 +351,7 @@ final class FileCache extends ConnectionAbstract
|
||||||
}
|
}
|
||||||
|
|
||||||
$obj = new $namespace();
|
$obj = new $namespace();
|
||||||
$obj->unserialize(\substr($raw, $namespaceEnd + 1));
|
$obj->__unserialize(\substr($raw, $namespaceEnd + 1));
|
||||||
|
|
||||||
return $obj;
|
return $obj;
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
|
|
@ -245,7 +245,7 @@ final class MemCached extends ConnectionAbstract
|
||||||
}
|
}
|
||||||
|
|
||||||
$obj = new $namespace();
|
$obj = new $namespace();
|
||||||
$obj->unserialize(\substr($raw, $namespaceEnd + 1));
|
$obj->__unserialize(\substr($raw, $namespaceEnd + 1));
|
||||||
|
|
||||||
return $obj;
|
return $obj;
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
|
|
@ -418,7 +418,7 @@ final class RedisCache extends ConnectionAbstract
|
||||||
} elseif ($type === CacheValueType::_ARRAY) {
|
} elseif ($type === CacheValueType::_ARRAY) {
|
||||||
return (string) \json_encode($value);
|
return (string) \json_encode($value);
|
||||||
} elseif ($type === CacheValueType::_SERIALIZABLE) {
|
} elseif ($type === CacheValueType::_SERIALIZABLE) {
|
||||||
return \get_class($value) . self::DELIM . $value->serialize();
|
return \get_class($value) . self::DELIM . $value->__serialize();
|
||||||
} elseif ($type === CacheValueType::_JSONSERIALIZABLE) {
|
} elseif ($type === CacheValueType::_JSONSERIALIZABLE) {
|
||||||
return \get_class($value) . self::DELIM . ((string) \json_encode($value->jsonSerialize()));
|
return \get_class($value) . self::DELIM . ((string) \json_encode($value->jsonSerialize()));
|
||||||
} elseif ($type === CacheValueType::_NULL) {
|
} elseif ($type === CacheValueType::_NULL) {
|
||||||
|
|
@ -475,7 +475,7 @@ final class RedisCache extends ConnectionAbstract
|
||||||
}
|
}
|
||||||
|
|
||||||
$obj = new $namespace();
|
$obj = new $namespace();
|
||||||
$obj->unserialize(\substr($raw, $namespaceEnd + 1));
|
$obj->__unserialize(\substr($raw, $namespaceEnd + 1));
|
||||||
|
|
||||||
return $obj;
|
return $obj;
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
|
|
@ -355,7 +355,7 @@ abstract class DataMapperAbstract
|
||||||
} elseif ($type === 'Json') {
|
} elseif ($type === 'Json') {
|
||||||
return (string) \json_encode($value);
|
return (string) \json_encode($value);
|
||||||
} elseif ($type === 'Serializable') {
|
} elseif ($type === 'Serializable') {
|
||||||
return $value->serialize();
|
return $value->__serialize();
|
||||||
} elseif (\is_object($value) && \method_exists($value, 'getId')) {
|
} elseif (\is_object($value) && \method_exists($value, 'getId')) {
|
||||||
return $value->getId();
|
return $value->getId();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -632,7 +632,7 @@ final class ReadMapper extends DataMapperAbstract
|
||||||
if ($member === null || $value === null) {
|
if ($member === null || $value === null) {
|
||||||
$obj->{$def['internal']} = $value;
|
$obj->{$def['internal']} = $value;
|
||||||
} else {
|
} else {
|
||||||
$member->unserialize($value);
|
$member->__unserialize($value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -706,7 +706,7 @@ final class ReadMapper extends DataMapperAbstract
|
||||||
$refProp->setValue($obj, \json_decode($value, true));
|
$refProp->setValue($obj, \json_decode($value, true));
|
||||||
} elseif ($def['mapper']::COLUMNS[$column]['type'] === 'Serializable') {
|
} elseif ($def['mapper']::COLUMNS[$column]['type'] === 'Serializable') {
|
||||||
$member = $isPublic ? $obj->{$member} : $refProp->getValue($obj);
|
$member = $isPublic ? $obj->{$member} : $refProp->getValue($obj);
|
||||||
$member->unserialize($value);
|
$member->__unserialize($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$isPublic) {
|
if (!$isPublic) {
|
||||||
|
|
|
||||||
|
|
@ -199,9 +199,9 @@ class SocketHeader extends HeaderAbstract
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function __serialize() : array
|
public function __serialize() : string
|
||||||
{
|
{
|
||||||
return [];
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -125,13 +125,13 @@ final class Dom implements ArrayableInterface
|
||||||
/**
|
/**
|
||||||
* Render message.
|
* Render message.
|
||||||
*
|
*
|
||||||
* @return array
|
* @return string
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function __serialize() : array
|
public function __serialize() : string
|
||||||
{
|
{
|
||||||
return $this->toArray();
|
return \json_encode($this->toArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -57,13 +57,13 @@ final class FormValidation implements \JsonSerializable, ArrayableInterface
|
||||||
/**
|
/**
|
||||||
* Render message.
|
* Render message.
|
||||||
*
|
*
|
||||||
* @return array
|
* @return string
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function __serialize() : array
|
public function __serialize() : string
|
||||||
{
|
{
|
||||||
return $this->toArray();
|
return \json_encode($this->toArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -161,13 +161,13 @@ final class Notify implements \JsonSerializable, ArrayableInterface
|
||||||
/**
|
/**
|
||||||
* Render message.
|
* Render message.
|
||||||
*
|
*
|
||||||
* @return array
|
* @return string
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function __serialize() : array
|
public function __serialize() : string
|
||||||
{
|
{
|
||||||
return $this->toArray();
|
return \json_encode($this->toArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -103,13 +103,13 @@ final class Redirect implements \JsonSerializable, ArrayableInterface
|
||||||
/**
|
/**
|
||||||
* Render message.
|
* Render message.
|
||||||
*
|
*
|
||||||
* @return array
|
* @return string
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function __serialize() : array
|
public function __serialize() : string
|
||||||
{
|
{
|
||||||
return $this->toArray();
|
return \json_encode($this->toArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -71,13 +71,13 @@ final class Reload implements \JsonSerializable, ArrayableInterface
|
||||||
/**
|
/**
|
||||||
* Render message.
|
* Render message.
|
||||||
*
|
*
|
||||||
* @return array
|
* @return string
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function __serialize() : array
|
public function __serialize() : string
|
||||||
{
|
{
|
||||||
return $this->toArray();
|
return \json_encode($this->toArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -306,9 +306,9 @@ class FloatInt
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function __serialize() : array
|
public function __serialize() : string
|
||||||
{
|
{
|
||||||
return [$this->getInt()];
|
return (string) $this->getInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -254,9 +254,9 @@ class Iban
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function __serialize() : array
|
public function __serialize() : string
|
||||||
{
|
{
|
||||||
return [$this->prettyPrint()];
|
return $this->prettyPrint();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -183,9 +183,9 @@ class Location implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function __serialize() : array
|
public function __serialize() : string
|
||||||
{
|
{
|
||||||
return $this->toArray();
|
return \json_encode($this->toArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -313,9 +313,9 @@ class PriorityQueue implements \Countable
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function __serialize() : array
|
public function __serialize() : string
|
||||||
{
|
{
|
||||||
return $this->queue;
|
return \json_encode($this->queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ class Interval
|
||||||
$this->start = $start ?? new \DateTime('now');
|
$this->start = $start ?? new \DateTime('now');
|
||||||
|
|
||||||
if ($interval !== null) {
|
if ($interval !== null) {
|
||||||
$this->unserialize($interval);
|
$this->__unserialize($interval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -520,13 +520,13 @@ class Interval
|
||||||
/**
|
/**
|
||||||
* Create string representation.
|
* Create string representation.
|
||||||
*
|
*
|
||||||
* @return array
|
* @return string
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function __serialize() : array
|
public function __serialize() : string
|
||||||
{
|
{
|
||||||
return [
|
return \json_encode([
|
||||||
'start' => $this->start->format('Y-m-d H:i:s'),
|
'start' => $this->start->format('Y-m-d H:i:s'),
|
||||||
'end' => $this->end === null ? null : $this->end->format('Y-m-d H:i:s'),
|
'end' => $this->end === null ? null : $this->end->format('Y-m-d H:i:s'),
|
||||||
'maxDuration' => $this->maxDuration,
|
'maxDuration' => $this->maxDuration,
|
||||||
|
|
@ -535,7 +535,7 @@ class Interval
|
||||||
'dayOfMonth' => $this->dayOfMonth,
|
'dayOfMonth' => $this->dayOfMonth,
|
||||||
'dayOfWeek' => $this->dayOfWeek,
|
'dayOfWeek' => $this->dayOfWeek,
|
||||||
'year' => $this->year,
|
'year' => $this->year,
|
||||||
];
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ final class MoneyTest extends \PHPUnit\Framework\TestCase
|
||||||
public function testMoneySerialization() : void
|
public function testMoneySerialization() : void
|
||||||
{
|
{
|
||||||
$money = new Money('999.23');
|
$money = new Money('999.23');
|
||||||
self::assertEquals(9992300, $money->serialize());
|
self::assertEquals(9992300, $money->__serialize());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -112,7 +112,7 @@ final class MoneyTest extends \PHPUnit\Framework\TestCase
|
||||||
public function testMoneyUnserialization() : void
|
public function testMoneyUnserialization() : void
|
||||||
{
|
{
|
||||||
$money = new Money('999.23');
|
$money = new Money('999.23');
|
||||||
$money->unserialize(3331234);
|
$money->__unserialize(3331234);
|
||||||
self::assertEquals('333.12', $money->getAmount());
|
self::assertEquals('333.12', $money->getAmount());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ final class DomTest extends \PHPUnit\Framework\TestCase
|
||||||
'selector' => '#sel',
|
'selector' => '#sel',
|
||||||
'action' => DomAction::SHOW,
|
'action' => DomAction::SHOW,
|
||||||
'content' => 'msg',
|
'content' => 'msg',
|
||||||
]), $obj->serialize());
|
]), $obj->__serialize());
|
||||||
|
|
||||||
self::assertEquals([
|
self::assertEquals([
|
||||||
'type' => 'dom',
|
'type' => 'dom',
|
||||||
|
|
@ -90,7 +90,7 @@ final class DomTest extends \PHPUnit\Framework\TestCase
|
||||||
], $obj->jsonSerialize());
|
], $obj->jsonSerialize());
|
||||||
|
|
||||||
$obj2 = new Dom();
|
$obj2 = new Dom();
|
||||||
$obj2->unserialize($obj->serialize());
|
$obj2->__unserialize($obj->__serialize());
|
||||||
self::assertEquals($obj, $obj2);
|
self::assertEquals($obj, $obj2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,11 +56,11 @@ final class FormValidationTest extends \PHPUnit\Framework\TestCase
|
||||||
$obj = new FormValidation($arr);
|
$obj = new FormValidation($arr);
|
||||||
|
|
||||||
self::assertEquals(['type' => 'validation', 'validation' => $arr], $obj->toArray());
|
self::assertEquals(['type' => 'validation', 'validation' => $arr], $obj->toArray());
|
||||||
self::assertEquals(\json_encode(['type' => 'validation', 'validation' => $arr]), $obj->serialize());
|
self::assertEquals(\json_encode(['type' => 'validation', 'validation' => $arr]), $obj->__serialize());
|
||||||
self::assertEquals(['type' => 'validation', 'validation' => $arr], $obj->jsonSerialize());
|
self::assertEquals(['type' => 'validation', 'validation' => $arr], $obj->jsonSerialize());
|
||||||
|
|
||||||
$obj2 = new FormValidation();
|
$obj2 = new FormValidation();
|
||||||
$obj2->unserialize($obj->serialize());
|
$obj2->__unserialize($obj->__serialize());
|
||||||
self::assertEquals($obj, $obj2);
|
self::assertEquals($obj, $obj2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ final class NotifyTest extends \PHPUnit\Framework\TestCase
|
||||||
'msg' => 'msg',
|
'msg' => 'msg',
|
||||||
'title' => 'title',
|
'title' => 'title',
|
||||||
'level' => NotifyType::ERROR,
|
'level' => NotifyType::ERROR,
|
||||||
]), $obj->serialize());
|
]), $obj->__serialize());
|
||||||
|
|
||||||
self::assertEquals([
|
self::assertEquals([
|
||||||
'type' => 'notify',
|
'type' => 'notify',
|
||||||
|
|
@ -96,7 +96,7 @@ final class NotifyTest extends \PHPUnit\Framework\TestCase
|
||||||
], $obj->jsonSerialize());
|
], $obj->jsonSerialize());
|
||||||
|
|
||||||
$obj2 = new Notify();
|
$obj2 = new Notify();
|
||||||
$obj2->unserialize($obj->serialize());
|
$obj2->__unserialize($obj->__serialize());
|
||||||
self::assertEquals($obj, $obj2);
|
self::assertEquals($obj, $obj2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ final class RedirectTest extends \PHPUnit\Framework\TestCase
|
||||||
$obj = new Redirect('url', true);
|
$obj = new Redirect('url', true);
|
||||||
|
|
||||||
self::assertEquals(['type' => 'redirect', 'time' => 0, 'uri' => 'url', 'new' => true], $obj->toArray());
|
self::assertEquals(['type' => 'redirect', 'time' => 0, 'uri' => 'url', 'new' => true], $obj->toArray());
|
||||||
self::assertEquals(\json_encode(['type' => 'redirect', 'time' => 0, 'uri' => 'url', 'new' => true]), $obj->serialize());
|
self::assertEquals(\json_encode(['type' => 'redirect', 'time' => 0, 'uri' => 'url', 'new' => true]), $obj->__serialize());
|
||||||
self::assertEquals(['type' => 'redirect', 'time' => 0, 'uri' => 'url', 'new' => true], $obj->jsonSerialize());
|
self::assertEquals(['type' => 'redirect', 'time' => 0, 'uri' => 'url', 'new' => true], $obj->jsonSerialize());
|
||||||
|
|
||||||
$obj->setDelay(6);
|
$obj->setDelay(6);
|
||||||
|
|
@ -67,7 +67,7 @@ final class RedirectTest extends \PHPUnit\Framework\TestCase
|
||||||
self::assertEquals(['type' => 'redirect', 'time' => 6, 'uri' => 'test', 'new' => true], $obj->toArray());
|
self::assertEquals(['type' => 'redirect', 'time' => 6, 'uri' => 'test', 'new' => true], $obj->toArray());
|
||||||
|
|
||||||
$obj2 = new Redirect();
|
$obj2 = new Redirect();
|
||||||
$obj2->unserialize($obj->serialize());
|
$obj2->__unserialize($obj->__serialize());
|
||||||
self::assertEquals($obj, $obj2);
|
self::assertEquals($obj, $obj2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,14 +55,14 @@ final class ReloadTest extends \PHPUnit\Framework\TestCase
|
||||||
$obj = new Reload(5);
|
$obj = new Reload(5);
|
||||||
|
|
||||||
self::assertEquals(['type' => 'reload', 'time' => 5], $obj->toArray());
|
self::assertEquals(['type' => 'reload', 'time' => 5], $obj->toArray());
|
||||||
self::assertEquals(\json_encode(['type' => 'reload', 'time' => 5]), $obj->serialize());
|
self::assertEquals(\json_encode(['type' => 'reload', 'time' => 5]), $obj->__serialize());
|
||||||
self::assertEquals(['type' => 'reload', 'time' => 5], $obj->jsonSerialize());
|
self::assertEquals(['type' => 'reload', 'time' => 5], $obj->jsonSerialize());
|
||||||
|
|
||||||
$obj->setDelay(6);
|
$obj->setDelay(6);
|
||||||
self::assertEquals(['type' => 'reload', 'time' => 6], $obj->toArray());
|
self::assertEquals(['type' => 'reload', 'time' => 6], $obj->toArray());
|
||||||
|
|
||||||
$obj2 = new Reload();
|
$obj2 = new Reload();
|
||||||
$obj2->unserialize($obj->serialize());
|
$obj2->__unserialize($obj->__serialize());
|
||||||
self::assertEquals($obj, $obj2);
|
self::assertEquals($obj, $obj2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,10 +60,10 @@ final class IbanTest extends \PHPUnit\Framework\TestCase
|
||||||
$iban = new Iban($strRepresentation);
|
$iban = new Iban($strRepresentation);
|
||||||
|
|
||||||
self::assertEquals($strRepresentation, $iban->prettyPrint());
|
self::assertEquals($strRepresentation, $iban->prettyPrint());
|
||||||
self::assertEquals($strRepresentation, $iban->serialize());
|
self::assertEquals($strRepresentation, $iban->__serialize());
|
||||||
|
|
||||||
$iban->unserialize('dE226008000009600280 00');
|
$iban->__unserialize('dE226008000009600280 00');
|
||||||
self::assertEquals('DE22 6008 0000 0960 0280 00', $iban->serialize());
|
self::assertEquals('DE22 6008 0000 0960 0280 00', $iban->__serialize());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -215,7 +215,7 @@ final class LocationTest extends \PHPUnit\Framework\TestCase
|
||||||
$this->location->setGeo(['lat' => 12.1, 'long' => 11.2,]);
|
$this->location->setGeo(['lat' => 12.1, 'long' => 11.2,]);
|
||||||
|
|
||||||
self::assertEquals($expected, $this->location->jsonSerialize());
|
self::assertEquals($expected, $this->location->jsonSerialize());
|
||||||
self::assertEquals(\json_encode($this->location->jsonSerialize()), $this->location->serialize());
|
self::assertEquals(\json_encode($this->location->jsonSerialize()), $this->location->__serialize());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -237,7 +237,7 @@ final class LocationTest extends \PHPUnit\Framework\TestCase
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
$this->location->unserialize(\json_encode($expected));
|
$this->location->__unserialize(\json_encode($expected));
|
||||||
self::assertEquals(\json_encode($expected), $this->location->serialize());
|
self::assertEquals(\json_encode($expected), $this->location->__serialize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -187,9 +187,9 @@ final class PriorityQueueTest extends \PHPUnit\Framework\TestCase
|
||||||
$queue->insert('c', -1);
|
$queue->insert('c', -1);
|
||||||
|
|
||||||
$queue2 = new PriorityQueue();
|
$queue2 = new PriorityQueue();
|
||||||
$queue2->unserialize($queue->serialize());
|
$queue2->__unserialize($queue->__serialize());
|
||||||
|
|
||||||
self::assertEquals($queue->serialize(), $queue2->serialize());
|
self::assertEquals($queue->__serialize(), $queue2->__serialize());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ final class IntervalTest extends \PHPUnit\Framework\TestCase
|
||||||
'dayOfMonth' => [],
|
'dayOfMonth' => [],
|
||||||
'dayOfWeek' => [],
|
'dayOfWeek' => [],
|
||||||
'year' => [],
|
'year' => [],
|
||||||
]), $interval->serialize()
|
]), $interval->__serialize()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -307,7 +307,7 @@ final class IntervalTest extends \PHPUnit\Framework\TestCase
|
||||||
'dayOfMonth' => [['start' => 1, 'end' => 3, 'step' => 2]],
|
'dayOfMonth' => [['start' => 1, 'end' => 3, 'step' => 2]],
|
||||||
'dayOfWeek' => [['start' => 1, 'end' => 3, 'step' => 2]],
|
'dayOfWeek' => [['start' => 1, 'end' => 3, 'step' => 2]],
|
||||||
'year' => [['start' => 1, 'end' => 3, 'step' => 2]],
|
'year' => [['start' => 1, 'end' => 3, 'step' => 2]],
|
||||||
]), $interval->serialize());
|
]), $interval->__serialize());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -327,7 +327,7 @@ final class IntervalTest extends \PHPUnit\Framework\TestCase
|
||||||
$interval->addDayOfMonth(1, 3, 2);
|
$interval->addDayOfMonth(1, 3, 2);
|
||||||
$interval->addDayOfWeek(1, 3, 2);
|
$interval->addDayOfWeek(1, 3, 2);
|
||||||
|
|
||||||
$interval2 = new Interval(null, $interval->serialize());
|
$interval2 = new Interval(null, $interval->__serialize());
|
||||||
|
|
||||||
self::assertEquals('2015-08-14', $interval2->getStart()->format('Y-m-d'));
|
self::assertEquals('2015-08-14', $interval2->getStart()->format('Y-m-d'));
|
||||||
self::assertEquals('2018-10-30', $interval2->getEnd()->format('Y-m-d'));
|
self::assertEquals('2018-10-30', $interval2->getEnd()->format('Y-m-d'));
|
||||||
|
|
|
||||||
|
|
@ -410,10 +410,10 @@ final class ViewTest extends \PHPUnit\Framework\TestCase
|
||||||
public function testSerialize() : void
|
public function testSerialize() : void
|
||||||
{
|
{
|
||||||
$view = new View();
|
$view = new View();
|
||||||
self::assertEquals('[]', $view->serialize());
|
self::assertEquals('[]', $view->__serialize());
|
||||||
|
|
||||||
$view->setTemplate('/phpOMS/tests/Views/testTemplate');
|
$view->setTemplate('/phpOMS/tests/Views/testTemplate');
|
||||||
self::assertEquals('<strong>Test</strong>', $view->serialize());
|
self::assertEquals('<strong>Test</strong>', $view->__serialize());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -476,7 +476,7 @@ final class ViewTest extends \PHPUnit\Framework\TestCase
|
||||||
$view = new View($this->app->l11nManager);
|
$view = new View($this->app->l11nManager);
|
||||||
$view->setTemplate('something.txt');
|
$view->setTemplate('something.txt');
|
||||||
|
|
||||||
self::assertEquals('', $view->serialize());
|
self::assertEquals('', $view->__serialize());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user