/**
  * Test if sortingDirection can be set
  *
  * @test
  * @return void
  */
 public function sortingDirectionCanBeSet()
 {
     $value = 'asc';
     $this->instance->setSortingDirection($value);
     $this->assertEquals($value, $this->instance->getSortingDirection());
 }
 /**
  * Create the demand object which define which records will get shown
  *
  * @param \GeorgRinger\News\Domain\Model\Dto\AdministrationDemand $demand
  * @return \GeorgRinger\News\Domain\Model\Dto\NewsDemand
  */
 protected function createDemandObjectFromSettings(\GeorgRinger\News\Domain\Model\Dto\AdministrationDemand $demand)
 {
     $demand->setCategories($demand->getSelectedCategories());
     $demand->setOrder($demand->getSortingField() . ' ' . $demand->getSortingDirection());
     $demand->setStoragePage(Page::extendPidListByChildren($this->pageUid, (int) $demand->getRecursive()));
     $demand->setOrderByAllowed($this->settings['orderByAllowed']);
     if ($demand->getSearchWord()) {
         $searchDto = new Search();
         $searchDto->setSubject($demand->getSearchWord());
         $searchDto->setFields('title');
         $demand->setSearch($searchDto);
     }
     // Ensure that always a storage page is set
     if ((int) $demand->getStoragePage() === 0) {
         $demand->setStoragePage('-3');
     }
     return $demand;
 }