Example #1
0
File: YoSpec.php Project: toin0u/yo
 /**
  * @param Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher
  * @param Ivory\HttpAdapter\ConfigurationInterface                   $configuration
  * @param Ivory\HttpAdapter\HttpAdapterInterface                     $adapter
  */
 function let($eventDispatcher, $configuration, $adapter)
 {
     $configuration->setTimeout(Yo::TIMEOUT)->shouldBeCalled();
     $configuration->setUserAgent(Yo::USER_AGENT)->shouldBeCalled();
     $configuration->setEncodingType(ConfigurationInterface::ENCODING_TYPE_URLENCODED)->shouldBeCalled();
     $configuration->getEventDispatcher()->willReturn($eventDispatcher);
     $adapter->getConfiguration()->willReturn($configuration);
     $adapter->setConfiguration($configuration)->shouldBeCalled();
     $this->beConstructedWith($adapter, self::API_KEY);
 }