/** * Test if selectedCategories can be set * * @test * @return void */ public function selectedCategoriesCanBeSet() { $value = array('Test 123'); $this->instance->setCategories($value); $this->assertEquals($value, $this->instance->getCategories()); }
/** * Create the demand object which define which records will get shown * * @param Tx_MooxNews_Domain_Model_Dto_AdministrationDemand $demand * @return Tx_MooxNews_Domain_Model_Dto_NewsDemand */ protected function createDemandObjectFromSettings(Tx_MooxNews_Domain_Model_Dto_AdministrationDemand $demand) { $demand->setCategories($demand->getSelectedCategories()); $demand->setYear($demand->getYear() > 0 ? $demand->getYear() : ""); $demand->setOrder($demand->getSortingField() . ' ' . $demand->getSortingDirection()); $demand->setStoragePage(Tx_MooxNews_Utility_Page::extendPidListByChildren($this->page, (int) $demand->getRecursive())); $demand->setOrderByAllowed($this->settings['orderByAllowed']); // Ensure that always a storage page is set if ((int) $demand->getStoragePage() === 0) { $demand->setStoragePage('-3'); } return $demand; }