/**
  * Return Code from a given Repository.
  *
  * @param Registry|string $registry Parent registry
  *
  * @return string code of the registry
  */
 private function getCodeOfRegistry($registry)
 {
     if ($registry instanceof Registry) {
         return $registry->getCode();
     }
     return $registry;
 }
Example #2
0
 /**
  * Tests Registry->setCode().
  */
 public function testSetCode()
 {
     $code = 'foo';
     $this->registry->setCode($code);
     $this->assertEquals($code, $this->registry->getCode());
 }