Skip to content

Commit

Permalink
abstracting the css event tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dogmatic69 committed Sep 29, 2012
1 parent 6010cab commit 63cf471
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
10 changes: 0 additions & 10 deletions Core/Assets/Test/Case/Lib/AssetsEventsTest.php
@@ -1,16 +1,6 @@
<?php
App::uses('InfinitasEventTestCase', 'Events.Test/Lib');
class AssetsEventsTest extends InfinitasEventTestCase {
/**
*@brief test required helpers load correctly
*/
public function testRequireHelpers() {
$this->ViewObject->params = array();
$expected = array('requireHelpersToLoad' => array('Assets' => array('Assets.Compress')));
$result = $this->Event->trigger($this->ViewObject, 'Assets.requireHelpersToLoad');
$this->assertEquals($expected, $result);
}

/**
* @brief test required js loads correctly
*/
Expand Down
13 changes: 13 additions & 0 deletions Core/Events/Test/Lib/InfinitasEventTestCase.php
Expand Up @@ -105,10 +105,23 @@ public function testRequireDatabaseConfigs() {
$this->assertEquals($expected, $result);
}

/**
* @brief test getting the admin menu
*/
public function testAdminMenu() {
$expected = $this->_manualCall('adminMenu', $this->ObjectEvent);

$result = $this->Event->trigger($this->ViewObject, $this->plugin . '.adminMenu');
$this->assertEquals($expected, $result);
}

/**
*@brief test required helpers load correctly
*/
public function testRequireHelpers() {
$expected = $this->_manualCall('requireHelpersToLoad', $this->ViewtEvent);

$result = $this->Event->trigger($this->ViewObject, $this->plugin . '.requireHelpersToLoad');
$this->assertEquals($expected, $result);
}
}

0 comments on commit 63cf471

Please sign in to comment.