コード例 #1
0
ファイル: TemplateHelperTest.php プロジェクト: Konafets/oelib
 /**
  * @test
  */
 public function hideAndUnhideSubpartsArrayHidesAndUnhidesTwoSubpartsWithPrefix()
 {
     $this->subject->processTemplate('Some text. ' . '<!-- ###FIRST_MY_SUBPART_1### -->' . 'More text here. ' . '<!-- ###FIRST_MY_SUBPART_1### -->' . '<!-- ###FIRST_MY_SUBPART_2### -->' . 'More text there. ' . '<!-- ###FIRST_MY_SUBPART_2### -->' . 'Even more text.');
     $this->subject->hideSubpartsArray(array('FIRST_MY_SUBPART_1'));
     $this->subject->hideSubpartsArray(array('FIRST_MY_SUBPART_2'));
     $this->subject->unhideSubpartsArray(array('1', '2'), array(''), 'FIRST_MY_SUBPART');
     self::assertSame('Some text. ' . 'More text here. ' . 'More text there. ' . 'Even more text.', $this->subject->getSubpart());
     self::assertSame('', $this->subject->getWrappedConfigCheckMessage());
 }