test/unit/Container/ContainerTest.php 1 location
|
@@ 131-139 (lines=9) @@
|
| 128 |
|
$this->assertSame($cont, $result); |
| 129 |
|
} |
| 130 |
|
|
| 131 |
|
public function testSerialize() |
| 132 |
|
{ |
| 133 |
|
$cont = new Container(['foo' => 'a', 'bar' => 'b', 'baz' => 'c']); |
| 134 |
|
|
| 135 |
|
$this->assertEquals( |
| 136 |
|
'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";}}', |
| 137 |
|
serialize($cont) |
| 138 |
|
); |
| 139 |
|
} |
| 140 |
|
|
| 141 |
|
public function testUnserialize() |
| 142 |
|
{ |
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 |
|
{ |