コード例 #1
0
 public function testGet_publication()
 {
     self::$DI['app']['notification.deliverer'] = $this->getMockBuilder('Alchemy\\Phrasea\\Notification\\Deliverer')->disableOriginalConstructor()->getMock();
     $date = new DateTime();
     $request = new Request([], [], [], [], [], ['HTTP_Accept' => 'application/json']);
     $feeds = self::$DI['app']['EM']->getRepository('Phraseanet:Feed')->getAllForUser(self::$DI['app']['acl']->get(self::$DI['user']));
     foreach ($feeds as $feed) {
         $result = $this->object->get_publication($request, $feed->getId(), self::$DI['user']);
         $this->checkResponseField($result, "feed", 'array');
         $this->checkResponseField($result, "entries", 'array');
         $this->checkResponseField($result, "offset_start", 'integer');
         $this->checkResponseField($result, "per_page", 'integer');
     }
 }