$parentProfile->
addChild($childProfile);
$this->storage->
write($parentProfile);
$this->storage->
write($childProfile);
// Load them from storage
$parentProfile =
$this->storage->
read('token_parent'
);
$childProfile =
$this->storage->
read('token_child'
);
// Check child has link to parent
$this->
assertNotNull($childProfile->
getParent());
$this->
assertEquals($parentProfile->
getToken(),
$childProfile->
getParentToken());
// Check parent has child
$children =
$parentProfile->
getChildren();
$this->
assertCount(1,
$children);
$this->
assertEquals($childProfile->
getToken(),
$children[0
]->
getToken());
} public function testStoreSpecialCharsInUrl() { // The storage accepts special characters in URLs (Even though URLs are not
// supposed to contain them)