/**
  * Return Akismet Service
  * @return AkismetService
  */
 public function createService(ServiceLocatorInterface $serviceLocator)
 {
     $config = $serviceLocator->get('Config');
     $options = array();
     if (isset($config['netglue_akismet'])) {
         $options = $config['netglue_akismet'];
     }
     // Options
     $service = new AkismetService();
     $service->setOptions($options);
     return $service;
 }
 /**
  * @covers ::call
  * @expectedException NetglueAkismet\Exception\InvalidArgumentException
  * @expectedExceptionMessage foo is not a valid API method
  */
 public function testCallThrowsExceptionForInvalidMethod()
 {
     $service = new AkismetService();
     $service->call('foo', array());
 }