Skip to content
Permalink
Browse files

Added additional test for View::startIfEmpty($name)

  • Loading branch information...
LiquidityC committed Nov 18, 2012
1 parent 03176c6 commit d6bf0dc00301f6e05742f0ddb644fba6eecdf7cc
Showing with 18 additions and 0 deletions.
  1. +18 −0 lib/Cake/Test/Case/View/ViewTest.php
@@ -1234,6 +1234,24 @@ public function testBlockCaptureStartIfEmpty() {
$this->assertEquals('Block content 1', $result);
}
/**
* Test block with startIfEmpty
*
* @return void
*/
public function testBlockCaptureStartStartIfEmpty() {
$this->View->start('test');
echo "Block content 1";
$this->View->end();
$this->View->startIfEmpty('test');
echo "Block content 2";
$this->View->end();
$result = $this->View->fetch('test');
$this->assertEquals('Block content 1', $result);
}
/**
* Test appending to a block with capturing output.
*

0 comments on commit d6bf0dc

Please sign in to comment.
You can’t perform that action at this time.