Пример #1
0
 /**
  * @test
  */
 public function extractHyperLinksFindsCorrectPathUsingAbsRefPrefix()
 {
     $absRefPrefix = '/' . md5(uniqid(''));
     $html = 'test <a href="' . $absRefPrefix . 'index.php">test</a> test';
     $GLOBALS['TSFE'] = $this->getMock('TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController', array(), array(), '', FALSE);
     $GLOBALS['TSFE']->config['config']['absRefPrefix'] = $absRefPrefix;
     $result = $this->fixture->extractHyperLinks($html);
     $this->assertEquals(1, count($result));
     $this->assertEquals(PATH_site . 'index.php', $result[0]['localPath']);
 }
Пример #2
0
 /**
  * @test
  */
 public function extractHyperLinksFindsCorrectPathUsingAbsRefPrefix()
 {
     $absRefPrefix = '/' . $this->getUniqueId();
     $html = 'test <a href="' . $absRefPrefix . 'index.php">test</a> test';
     $GLOBALS['TSFE'] = $this->getMock(\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::class, array(), array(), '', false);
     $GLOBALS['TSFE']->config['config']['absRefPrefix'] = $absRefPrefix;
     $result = $this->subject->extractHyperLinks($html);
     $this->assertEquals(1, count($result));
     $this->assertEquals(PATH_site . 'index.php', $result[0]['localPath']);
 }