mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Update test.
Add fixtures so app tables aren't touched. Replace construction with method calls.
This commit is contained in:
parent
2c7854cc2f
commit
17ffcde505
1 changed files with 11 additions and 4 deletions
|
@ -170,6 +170,13 @@ class TestAfterHelper extends Helper {
|
|||
*/
|
||||
class ViewTest extends CakeTestCase {
|
||||
|
||||
/**
|
||||
* Fixtures used in this test.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fixtures = array('core.user', 'core.post');
|
||||
|
||||
/**
|
||||
* setUp method
|
||||
*
|
||||
|
@ -576,14 +583,14 @@ class ViewTest extends CakeTestCase {
|
|||
$View->Helpers = $this->getMock('HelperCollection', array('trigger'), array($View));
|
||||
|
||||
$View->Helpers->expects($this->at(0))->method('trigger')
|
||||
->with('beforeRender', new PHPUnit_Framework_Constraint_IsAnything());
|
||||
->with('beforeRender', $this->anything());
|
||||
$View->Helpers->expects($this->at(1))->method('trigger')
|
||||
->with('afterRender', new PHPUnit_Framework_Constraint_IsAnything());
|
||||
->with('afterRender', $this->anything());
|
||||
|
||||
$View->Helpers->expects($this->at(2))->method('trigger')
|
||||
->with('beforeLayout', new PHPUnit_Framework_Constraint_IsAnything());
|
||||
->with('beforeLayout', $this->anything());
|
||||
$View->Helpers->expects($this->at(3))->method('trigger')
|
||||
->with('afterLayout', new PHPUnit_Framework_Constraint_IsAnything());
|
||||
->with('afterLayout', $this->anything());
|
||||
|
||||
$View->render('index');
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue