forked from ucla-oarc-mobile/mwf
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/form_decorator_refactor' into ucsf/develop
Conflicts: root/assets/lib/decorator/html/tag.class.php root/assets/lib/decorator/site/footer.class.php root/assets/lib/decorator/site/menu.class.php
- Loading branch information
Showing
6 changed files
with
82 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
test/php_unit/root/assets/lib/decorator/site/Footer_Site_DecoratorTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,57 @@ | |||
<?php | |||
|
|||
require_once dirname(__FILE__) . '/../../../../../../../root/assets/lib/decorator/site/footer.class.php'; | |||
|
|||
/** | |||
* Test class for Footer_Site_Decorator. | |||
* Generated by PHPUnit on 2012-03-29 at 23:26:46. | |||
*/ | |||
class Footer_Site_DecoratorTest extends PHPUnit_Framework_TestCase { | |||
|
|||
/** | |||
* @var Footer_Site_Decorator | |||
*/ | |||
protected $object; | |||
|
|||
/** | |||
* Sets up the fixture, for example, opens a network connection. | |||
* This method is called before a test is executed. | |||
*/ | |||
protected function setUp() { | |||
$this->object = new Footer_Site_Decorator; | |||
} | |||
|
|||
/** | |||
* Tears down the fixture, for example, closes a network connection. | |||
* This method is called after a test is executed. | |||
*/ | |||
protected function tearDown() { | |||
|
|||
} | |||
|
|||
/** | |||
* @test | |||
*/ | |||
public function render_noRawFlag_encodesResult() { | |||
$this->object->add_inner('&'); | |||
$this->assertContains('&', $this->object->render()); | |||
} | |||
|
|||
/** | |||
* @test | |||
*/ | |||
public function render_rawFlagTrue_doesNotEncodesResult() { | |||
$this->object->add_inner('&'); | |||
$this->assertNotContains('&', $this->object->render(true)); | |||
} | |||
|
|||
/** | |||
* @test | |||
*/ | |||
public function render_rawFlagFalse_doesNotEncodesResult() { | |||
$this->object->add_inner('&'); | |||
$this->assertContains('&', $this->object->render(false)); | |||
} | |||
|
|||
} | |||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters