protected function alterPageContentToCreateNewRevisionWithoutAnnotations()
 {
     $pageCreator = new PageCreator();
     $pageCreator->createPage($this->title)->doEdit('No annotations');
     $this->testEnvironment->executePendingDeferredUpdates();
     return $pageCreator->getPage()->getRevision()->getId();
 }
 public function testPagePurge()
 {
     $this->applicationFactory->registerObject('CacheHandler', new \SMW\CacheHandler(new \HashBagOStuff()));
     $this->title = Title::newFromText(__METHOD__);
     $pageCreator = new PageCreator();
     $pageCreator->createPage($this->title)->doEdit('[[Has function hook test::page purge]]');
     $id = ArticlePurge::newCacheId($this->title->getArticleID());
     $pageCreator->getPage()->doPurge();
     $result = ApplicationFactory::getInstance()->getcache()->setKey($id)->get();
     $this->assertTrue($result);
 }
 public function testPagePurge()
 {
     $cacheFactory = $this->applicationFactory->newCacheFactory();
     $cache = $cacheFactory->newFixedInMemoryCache();
     $this->applicationFactory->registerObject('Cache', $cache);
     $this->title = Title::newFromText(__METHOD__);
     $pageCreator = new PageCreator();
     $pageCreator->createPage($this->title)->doEdit('[[Has function hook test::page purge]]');
     $key = $cacheFactory->getPurgeCacheKey($this->title->getArticleID());
     $pageCreator->getPage()->doPurge();
     $this->assertTrue($cache->fetch($key));
 }
 protected function alterPageContentToCreateNewRevisionWithoutAnnotations()
 {
     $pageCreator = new PageCreator();
     $pageCreator->createPage($this->title)->doEdit('No annotations');
     return $pageCreator->getPage()->getRevision()->getId();
 }