/** * @covers sCategories::sGetCategoryContent */ public function testsGetCategoryContent() { // Default arguments should work $this->assertEquals($this->module->sGetCategoryContent(null), $this->module->sGetCategoryContent(Shopware()->Shop()->get('parentID'))); $categoryArray = $this->module->sGetCategoryContent(21); $this->assertArrayHasKey('id', $categoryArray); $this->assertArrayHasKey('parentId', $categoryArray); $this->assertArrayHasKey('name', $categoryArray); $this->assertArrayHasKey('position', $categoryArray); $this->assertArrayHasKey('active', $categoryArray); $this->assertArrayHasKey('description', $categoryArray); $this->assertArrayHasKey('template', $categoryArray); $this->assertArrayHasKey('sSelf', $categoryArray); $this->assertArrayHasKey('sSelfCanonical', $categoryArray); $this->assertArrayHasKey('atomFeed', $categoryArray); $this->assertArrayHasKey('layout', $categoryArray); }
/** * @covers sCategories::sGetCategoryContent */ public function testsGetCategoryContent() { // Call dispatch as we need the Router to be available inside sCore $this->dispatch('/'); // Default arguments should work $this->assertEquals($this->module->sGetCategoryContent(null), $this->module->sGetCategoryContent(Shopware()->Shop()->get('parentID'))); $categoryArray = $this->module->sGetCategoryContent(21); $this->assertArrayHasKey('id', $categoryArray); $this->assertArrayHasKey('parentId', $categoryArray); $this->assertArrayHasKey('name', $categoryArray); $this->assertArrayHasKey('position', $categoryArray); $this->assertArrayHasKey('active', $categoryArray); $this->assertArrayHasKey('description', $categoryArray); $this->assertArrayHasKey('template', $categoryArray); $this->assertArrayHasKey('sSelf', $categoryArray); $this->assertArrayHasKey('canonicalParams', $categoryArray); $this->assertArrayHasKey('atomFeed', $categoryArray); $this->assertArrayHasKey('layout', $categoryArray); }