test/unit/Container/ImmutableContainerTest.php 1 location
|
@@ 138-146 (lines=9) @@
|
| 135 |
|
$this->assertInstanceOf(ImmutableContainer::class, $result); |
| 136 |
|
} |
| 137 |
|
|
| 138 |
|
public function testSerialize() |
| 139 |
|
{ |
| 140 |
|
$cont = new ImmutableContainer(['foo' => 'a', 'bar' => 'b', 'baz' => 'c']); |
| 141 |
|
|
| 142 |
|
$this->assertEquals( |
| 143 |
|
'C:48:"Graze\DataStructure\Container\ImmutableContainer":60:{a:3:{s:3:"foo";s:1:"a";s:3:"bar";s:1:"b";s:3:"baz";s:1:"c";}}', |
| 144 |
|
serialize($cont) |
| 145 |
|
); |
| 146 |
|
} |
| 147 |
|
|
| 148 |
|
public function testUnserialize() |
| 149 |
|
{ |
test/unit/Container/ImmutableFlatContainerTest.php 1 location
|
@@ 138-146 (lines=9) @@
|
| 135 |
|
$this->assertInstanceOf(ImmutableFlatContainer::class, $result); |
| 136 |
|
} |
| 137 |
|
|
| 138 |
|
public function testSerialize() |
| 139 |
|
{ |
| 140 |
|
$cont = new ImmutableFlatContainer(['foo' => 'a', 'bar' => 'b', 'baz' => 'c']); |
| 141 |
|
|
| 142 |
|
$this->assertEquals( |
| 143 |
|
'C:52:"Graze\DataStructure\Container\ImmutableFlatContainer":60:{a:3:{s:3:"foo";s:1:"a";s:3:"bar";s:1:"b";s:3:"baz";s:1:"c";}}', |
| 144 |
|
serialize($cont) |
| 145 |
|
); |
| 146 |
|
} |
| 147 |
|
|
| 148 |
|
public function testUnserialize() |
| 149 |
|
{ |
test/unit/Container/ContainerTest.php 1 location
|
@@ 152-160 (lines=9) @@
|
| 149 |
|
$this->assertSame($cont, $result); |
| 150 |
|
} |
| 151 |
|
|
| 152 |
|
public function testSerialize() |
| 153 |
|
{ |
| 154 |
|
$cont = new Container(['foo' => 'a', 'bar' => 'b', 'baz' => 'c']); |
| 155 |
|
|
| 156 |
|
$this->assertEquals( |
| 157 |
|
'C:39:"Graze\DataStructure\Container\Container":60:{a:3:{s:3:"foo";s:1:"a";s:3:"bar";s:1:"b";s:3:"baz";s:1:"c";}}', |
| 158 |
|
serialize($cont) |
| 159 |
|
); |
| 160 |
|
} |
| 161 |
|
|
| 162 |
|
public function testUnserialize() |
| 163 |
|
{ |