Skip to content

Commit

Permalink
Including __call() test for plugin option
Browse files Browse the repository at this point in the history
  • Loading branch information
andretefras committed Feb 4, 2015
1 parent 1db6216 commit 58e69c5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/TestCase/Controller/Component/FlashComponentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,5 +178,16 @@ public function testCall()
];
$result = $this->Session->read('Flash.flash');
$this->assertEquals($expected, $result, 'Element is ignored in magic call.');

$this->Flash->success('It worked', ['plugin' => 'MyPlugin']);

$expected = [
'message' => 'It worked',
'key' => 'flash',
'element' => 'MyPlugin.Flash/success',
'params' => []
];
$result = $this->Session->read('Flash.flash');
$this->assertEquals($expected, $result);
}
}

0 comments on commit 58e69c5

Please sign in to comment.