Skip to content

Commit

Permalink
refs #57 fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tsteur committed Mar 3, 2014
1 parent 7dd613a commit 2a60ff3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/PHPUnit/Integration/Core/WidgetsListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ public function testGet()
'Goals_Goals' => 1,
'SEO' => 2,
'Example Widgets' => 4,
'DevicesDetection_DevicesDetection' => 7
'DevicesDetection_DevicesDetection' => 7,
'Insights_Category' => 1
);

// number of main categories
Expand Down Expand Up @@ -84,7 +85,7 @@ public function testGetWithGoals()
WidgetsList::_reset();

// number of main categories
$this->assertEquals(11, count($widgets));
$this->assertEquals(12, count($widgets));

// check that the goal widget was added
$numberOfWidgets = array(
Expand Down Expand Up @@ -119,7 +120,7 @@ public function testGetWithGoalsAndEcommerce()
WidgetsList::_reset();

// number of main categories
$this->assertEquals(12, count($widgets));
$this->assertEquals(13, count($widgets));

// check if each category has the right number of widgets
$numberOfWidgets = array(
Expand Down Expand Up @@ -152,11 +153,11 @@ public function testRemove()
WidgetsList::_reset();
$widgets = WidgetsList::get();

$this->assertCount(12, $widgets);
$this->assertCount(13, $widgets);
WidgetsList::remove('SEO', 'NoTeXiStInG');

$widgets = WidgetsList::get();
$this->assertCount(12, $widgets);
$this->assertCount(13, $widgets);

$this->assertArrayHasKey('SEO', $widgets);
$this->assertCount(2, $widgets['SEO']);
Expand Down

0 comments on commit 2a60ff3

Please sign in to comment.