Skip to content

Instantly share code, notes, and snippets.

@rizqidjamaluddin
Last active August 29, 2015 14:11
Show Gist options
  • Select an option

  • Save rizqidjamaluddin/be46b1bc03be6d3a6360 to your computer and use it in GitHub Desktop.

Select an option

Save rizqidjamaluddin/be46b1bc03be6d3a6360 to your computer and use it in GitHub Desktop.
<?php
/**
* @test
*/
public function users_can_post_links_in_their_profile()
{
$mario = $this->registerAndLoginAsMario();
$set = $this->callJson('PUT', "/api/users/{$mario->hash}/profile", ['bio' => "A URL: http://www.google.com"]);
$fetch = $this->callJson('GET', "/api/users/{$mario->hash}/profile");
$this->assertEquals("A URL: http://www.google.com", $fetch->profiles[0]->bio);
$this->assertEquals(
'<p>A URL: <a href="http://www.google.com" target="_blank">http://www.google.com</a></p>',
$fetch->profiles[0]->html_bio
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment