Пример #1
0
 protected function _apiFakeMethod()
 {
     $serviceLocator = getServiceLocator();
     $client = $serviceLocator->get('ZendPress\\Service\\Client');
     $this->setExpectedException('Exception');
     $client->api('/test', 'FAKEMETHOD', array());
 }
Пример #2
0
 public function testRemoveFilter()
 {
     $sl = getServiceLocator();
     $filter = $sl->get('ZendPress\\Api\\Filter');
     $this->setExpectedException('Exception');
     $this->assertTrue($filter->removeFilter('key'));
 }
Пример #3
0
 public function testToArray()
 {
     $sl = getServiceLocator();
     $post = $sl->get('ZendPress\\Entity\\Post');
     $this->setExpectedException('Exception');
     $post->toArray();
 }
 public function testGetItemsByPage()
 {
     $sl = getServiceLocator();
     $cm = $sl->get('ZendPress\\Api\\CollectionManager');
     $this->setExpectedException('Exception');
     $cm->getItemsByPage(2);
 }
Пример #5
0
 public function testSetEntity()
 {
     $sl = getServiceLocator();
     $em = $sl->get('ZendPress\\Api\\EntityManager');
     $em->setEntity($sl->get('ZendPress\\Entity\\Post'));
 }
Пример #6
0
 protected function getServiceLocator()
 {
     return getServiceLocator();
 }