|
@@ 121-132 (lines=12) @@
|
| 118 |
|
/** |
| 119 |
|
* Test serialization twice same value |
| 120 |
|
*/ |
| 121 |
|
public function testSerializationMultipleTimeSameValue(): void |
| 122 |
|
{ |
| 123 |
|
$user = new User(); |
| 124 |
|
$userTwo = new User(); |
| 125 |
|
$this->generateCacheManager(); |
| 126 |
|
$this->generateRequestContext(); |
| 127 |
|
$this->eventManager->addEventListeners($this->requestContext, $this->cacheManager, $this->vichStorage); |
| 128 |
|
$this->eventManager->dispatchEvents($this->context, $user); |
| 129 |
|
$this->eventManager->dispatchEvents($this->context, $userTwo); |
| 130 |
|
static::assertEquals('http://example.com:8800/a/path/to/an/image2.png', $user->getPhotoName()); |
| 131 |
|
static::assertEquals('http://example.com:8800/a/path/to/an/image2.png', $userTwo->getPhotoName()); |
| 132 |
|
} |
| 133 |
|
|
| 134 |
|
/** |
| 135 |
|
* Test serialization twice same value |
|
@@ 137-148 (lines=12) @@
|
| 134 |
|
/** |
| 135 |
|
* Test serialization twice same value |
| 136 |
|
*/ |
| 137 |
|
public function testSerializationMultipleDifferentValue(): void |
| 138 |
|
{ |
| 139 |
|
$user = new User('test_user_1.png'); |
| 140 |
|
$userTwo = new User('test_user_2.png'); |
| 141 |
|
$this->generateCacheManager(); |
| 142 |
|
$this->generateRequestContext(); |
| 143 |
|
$this->eventManager->addEventListeners($this->requestContext, $this->cacheManager, $this->vichStorage); |
| 144 |
|
$this->eventManager->dispatchEvents($this->context, $user); |
| 145 |
|
$this->eventManager->dispatchEvents($this->context, $userTwo); |
| 146 |
|
static::assertEquals('http://example.com:8800/a/path/to/an/image2.png', $user->getPhotoName()); |
| 147 |
|
static::assertEquals('http://example.com:8800/a/path/to/an/image5.png', $userTwo->getPhotoName()); |
| 148 |
|
} |
| 149 |
|
|
| 150 |
|
/** |
| 151 |
|
* Test serialization of proxy object and field with array of filters |