aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2014-11-13 21:35:48 +0100
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2014-11-13 21:35:48 +0100
commit717129e082894cbf64180c0fbb904a3c8941147b (patch)
tree58e96650ca7952a0cc03554176fc06cf5e5ad8df
parent6be0d86e739758049d047cd8364f9efe6cb7fb66 (diff)
downloadRegistry-2.14.11.15.zip
Registry-2.14.11.15.tar.gz
Registry-2.14.11.15.tar.bz2
Test value, protocol and references.2.14.11.15
-rw-r--r--Test/Unit/Registry.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/Test/Unit/Registry.php b/Test/Unit/Registry.php
index 46e3cac..972b18a 100644
--- a/Test/Unit/Registry.php
+++ b/Test/Unit/Registry.php
@@ -137,4 +137,38 @@ class Registry extends Test\Unit\Suite {
->string($result)
->isEqualTo($value);
}
+
+ public function case_value_protocol_and_references ( ) {
+
+ $this
+ ->given(
+ $string = $this->realdom->string('a', 'z', 5),
+ $object = $this->realdom->class('StdClass'),
+ $key = $this->sample($string),
+ $value = $this->sample($object),
+ LUT::set($key, $value)
+ )
+ ->when(
+ $result1 = resolve('hoa://Library/Registry#' . $key),
+ $result2 = LUT::get($key)
+ )
+ ->then
+ ->object($result1)
+ ->isInstanceOf('StdClass')
+ ->isIdenticalTo($value)
+ ->isIdenticalTo($result2)
+
+ ->given($dummy = $this->sample($string))
+ ->when(
+ $result1->foo = $dummy,
+ $result3 = resolve('hoa://Library/Registry#' . $key)
+ )
+ ->then
+ ->object($result1)
+ ->isIdenticalTo($result2)
+ ->isIdenticalTo($result3)
+
+ ->string($result1->foo)
+ ->isEqualTo($dummy);
+ }
}