Пример #1
0
 function test_content_for()
 {
     $str = "test CaptureHelper content_for";
     $this->capture_helper->content_for('content_for');
     echo $str;
     $this->assertEqual($this->capture_helper->end(), $str);
     $globals = AkActionView::_getGlobals();
     $this->assertEqual($globals['content_for_content_for'], $str);
 }
Пример #2
0
 public function test_concatenation()
 {
     $this->capture_helper->content_for('concatenation');
     echo 'A';
     $this->assertEqual($this->capture_helper->end(), 'A');
     $this->capture_helper->content_for('concatenation');
     echo 'B';
     $this->assertEqual($this->capture_helper->end(), 'B');
     $globals = AkActionView::_getGlobals();
     $this->assertEqual($globals['content_for_concatenation'], 'AB');
 }