public function testContentTypes()
 {
     $repository = new Repository('phpunit', $this->connection);
     $contentTypeNames = $repository->getContentTypeNames();
     $this->assertCount(1, $contentTypeNames);
     $this->assertTrue($repository->hasContentType('temp'));
 }
 public function addRepository($name, Repository $repository, $title = null)
 {
     $repository->setName($name);
     $repository->setTitle($title);
     $userInfo = $repository->getCurrentUserInfo();
     if ($userInfo->getName() == '' && $this->userInfo != null) {
         $repository->setUserInfo($this->userInfo);
     }
     $this->repositories[$repository->getName()] = $repository;
     foreach ($repository->getContentTypeNames() as $contentTypeName) {
         $this->contentTypeAccessHashes[$this->getContentTypeAccessHash($repository, $contentTypeName)] = ['repositoryId' => $repository->getName(), 'contentTypeName' => $contentTypeName];
     }
     foreach ($repository->getConfigTypeNames() as $configTypeName) {
         $this->configTypeAccessHashes[$this->getConfigTypeAccessHash($repository, $configTypeName)] = ['repositoryId' => $repository->getName(), 'configTypeName' => $configTypeName];
     }
     $this->repositoryAccessHashes[$this->getRepositoryAccessHash($repository)] = ['repositoryId' => $repository->getName()];
 }