Beispiel #1
0
 function it_throws_exception_when_found_url_but_delete_token_doesnt_match(UrlRepository $repository, Url $url)
 {
     $url->getDeleteToken()->willReturn('other_token');
     $request = new DeleteUrlRequest('uid', 'delete_token');
     $repository->findByUid('uid')->shouldBeCalled()->willReturn($url);
     $this->beConstructedWith($repository);
     $this->shouldThrow('Urleak\\Domain\\Command\\UrlDeleteTokenMismatchException')->during('execute', [$request]);
 }
 private function createEntityFromModel(Url $url)
 {
     return new EntityUrl($url->getUrl(), $url->getUid(), $url->getDeleteToken());
 }