Skip to content

Instantly share code, notes, and snippets.

@monsat
Created August 22, 2011 02:38
Show Gist options
  • Save monsat/1161545 to your computer and use it in GitHub Desktop.
Save monsat/1161545 to your computer and use it in GitHub Desktop.
Skeleton file of Helper Test Case for CakePHP2.0 (beta)
<?php
App::uses('View', 'View');
App::uses('SampleHelper', 'View/Helper');
class SampleHelperTestCase extends CakeTestCase {
public function setUp() {
parent::setUp();
$this->View = new View(null);
$this->SampleHelper = new SampleHelper($this->View);
}
public function tearDown() {
unset($this->SampleHelper);
ClassRegistry::flush();
parent::tearDown();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment