/** * Test case for the frontend top seller selection */ public function testTopSellerSelection() { $this->removeDemoData(); $this->insertDemoData(); $category = $this->getDemoCategory(); $topSeller = $this->module->sGetArticleCharts($category['id']); $this->assertCount(2, $topSeller); //the article "2" pseudo sales are set to 1000 so we expect that this will be the first article //in the top seller slider. $this->assertEquals(2, $topSeller[0]['articleID']); $this->assertEquals(3, $topSeller[1]['articleID']); $this->removeDemoData(); }