コード例 #1
0
 /**
  * @covers \NewFrontiers\Framework\Output\ModalWrapper::render
  */
 public function testRender()
 {
     $modalWrapper = new ModalWrapper();
     $modalWrapper->render(new TestView(new Controller(null, null)), "Testrender");
     //output shouldn't be empty
     $this->expectOutputRegex("/.+/");
     $html = $this->getActualOutput();
     $this->assertContains("Testrender", $html);
     $this->assertContains("modal", $html);
     $this->assertContains("ungewöhnliche ID", $html);
     $dom = new \DOMDocument();
     $dom->validateOnParse = true;
     $isValid = $dom->loadHTML($html);
     $this->assertTrue($isValid);
 }
コード例 #2
0
 /**
  * Gibt den aktuellen View als Modal aus
  * @param View $view
  */
 protected function modalDialog(View $view)
 {
     // Im Modal wird entweder die aktuelle Überschrift oder der Seitentitel ausgegeben
     $titel = $this->response->getMetadata()->getHeading();
     $modal = new ModalWrapper();
     $modal->render($view, $titel);
 }