Beispiel #1
0
 function it_shortens_a_url(Provider $provider1, Provider $provider2)
 {
     $provider1->shorten('http://any.url')->willReturn('http://short.ly/1234');
     $provider2->shorten('http://short.ly/1234')->willReturn('http://short.er/1234');
     $this->addProvider($provider1);
     $this->addProvider($provider2);
     $this->shorten('http://any.url')->shouldReturn('http://short.er/1234');
 }
Beispiel #2
0
 function it_shortens_a_url(Provider $provider)
 {
     $provider->shorten('http://any.url')->willReturn("http://goo.gl/shortened");
     $this->shorten('http://any.url')->shouldReturn("http://goo.gl/shortened");
 }