Skip to content
Extraits de code Groupes Projets
Valider c74e58d4 rédigé par mattab's avatar mattab
Parcourir les fichiers

* not sure why now there are only 12 instead of 13 widgets

  * Simplifying other tests so that we can only update 1 widget count when a widget is added

git-svn-id: http://dev.piwik.org/svn/trunk@7827 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent 337d6b26
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -40,7 +40,7 @@ class WidgetsListTest extends DatabaseTestCase ...@@ -40,7 +40,7 @@ class WidgetsListTest extends DatabaseTestCase
$numberOfWidgets = array( $numberOfWidgets = array(
'VisitsSummary_VisitsSummary' => 6, 'VisitsSummary_VisitsSummary' => 6,
'Live!' => 2, 'Live!' => 2,
'General_Visitors' => 13, 'General_Visitors' => 12,
'UserSettings_VisitorSettings' => 10, 'UserSettings_VisitorSettings' => 10,
'Actions_Actions' => 8, 'Actions_Actions' => 8,
'Actions_SubmenuSitesearch' => 5, 'Actions_SubmenuSitesearch' => 5,
...@@ -84,23 +84,14 @@ class WidgetsListTest extends DatabaseTestCase ...@@ -84,23 +84,14 @@ class WidgetsListTest extends DatabaseTestCase
// there should be 11 main categories // there should be 11 main categories
$this->assertEquals(11, count($widgets)); $this->assertEquals(11, count($widgets));
// check if each category has the right number of widgets // check that the goal widget was added
$numberOfWidgets = array( $numberOfWidgets = array(
'VisitsSummary_VisitsSummary' => 6,
'Live!' => 2,
'General_Visitors' => 13,
'UserSettings_VisitorSettings' => 10,
'Actions_Actions' => 8,
'Actions_SubmenuSitesearch' => 5,
'Referers_Referers' => 6,
'Goals_Goals' => 2, 'Goals_Goals' => 2,
'SEO' => 2,
'Example Widgets' => 3,
'ExamplePlugin_exampleWidgets' => 3
); );
foreach ($numberOfWidgets AS $category => $widgetCount) { foreach ($numberOfWidgets AS $category => $widgetCount) {
$this->assertEquals($widgetCount, count($widgets[$category])); $expected = count($widgets[$category]);
$this->assertEquals($widgetCount, count($widgets[$category]));
} }
} }
...@@ -134,18 +125,8 @@ class WidgetsListTest extends DatabaseTestCase ...@@ -134,18 +125,8 @@ class WidgetsListTest extends DatabaseTestCase
// check if each category has the right number of widgets // check if each category has the right number of widgets
$numberOfWidgets = array( $numberOfWidgets = array(
'VisitsSummary_VisitsSummary' => 6,
'Live!' => 2,
'General_Visitors' => 13,
'UserSettings_VisitorSettings' => 10,
'Actions_Actions' => 8,
'Actions_SubmenuSitesearch' => 5,
'Referers_Referers' => 6,
'Goals_Goals' => 2, 'Goals_Goals' => 2,
'Goals_Ecommerce' => 5, 'Goals_Ecommerce' => 5,
'SEO' => 2,
'Example Widgets' => 3,
'ExamplePlugin_exampleWidgets' => 3
); );
foreach ($numberOfWidgets AS $category => $widgetCount) { foreach ($numberOfWidgets AS $category => $widgetCount) {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter