public function testSimilarPrefixes() { $this->proxy->registerContainer("a", $this->actualContainerA); $this->proxy->registerContainer("ab", $this->actualContainerB); $this->proxy->addObjAttrs($this->testObj, ["abkey" => "val"]); $this->assertTrue($this->proxy->objHasAttr($this->testObj, "abkey")); $this->assertEquals("val", $this->proxy->getObjAttrVal($this->testObj, "abkey")); $this->assertEquals("val", $this->actualContainerB->getObjAttrVal($this->testObj, "key")); }
public function testExceptionWhenAccessingNonexistentAttr() { $this->setExpectedException(AttributeNotFound::class); $this->attrContainer->getObjAttrVal($this->testObj, "nonexistent-attr-key"); }