Skip to content
Snippets Groups Projects
Commit 8679e5ae authored by llaffont's avatar llaffont
Browse files

Correction tests lien Facebook

parent 5551ce96
Branches
Tags
No related merge requests found
......@@ -186,12 +186,14 @@ class ProfilOptionsControllerTwitterLinkWithProfilAdulteTest extends ProfilOptio
$this->_mock_web_client
->whenCalled('open_url')
->with(sprintf('http://is.gd/api.php?longurl=%s',
urlencode('http://localhost' . BASE_URL . '/index/index?id_profil=2')))
urlencode('http://localhost/index/index')))
->answers('http://is.gd/PkdNgD')
->whenCalled('open_url')
->with('http://is.gd/api.php?longurl=http%3A%2F%2Flocalhost%2Findex%2Findex')
->with(sprintf('http://is.gd/api.php?longurl=%s',
urlencode('http://localhost' . BASE_URL . '/index/index')))
->answers('http://is.gd/PkdNgD')
->beStrict()
;
}
......@@ -204,8 +206,8 @@ class ProfilOptionsControllerTwitterLinkWithProfilAdulteTest extends ProfilOptio
/** @test */
public function twitterLinkShouldReturnJavascriptForTweet() {
$this->dispatch('/opac/index/share/on/twitter/titre/Profil+Adulte?url='.urlencode('http://localhost'.BASE_URL.'/index/index'));
$this->assertContains("window.open('http://twitter.com/share?url=http%3A%2F%2Fis.gd%2FZOygg6&text=Profil+Adulte&counturl=http%3A%2F%2Fis.gd%2FZOygg6','_blank','toolbar=0,status=0,width=800, height=410');",
$this->dispatch('/opac/index/share/on/twitter/titre/Profil+Adulte?url='.urlencode('http://localhost'.BASE_URL.'/index/index'), true);
$this->assertContains("window.open('http://twitter.com/share?url=http%3A%2F%2Fis.gd%2FPkdNgD&text=Profil+Adulte&counturl=http%3A%2F%2Fis.gd%2FPkdNgD','_blank','toolbar=0,status=0,width=800, height=410');",
$this->_response->getBody());
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment