jonnybarnes.uk/tests/Feature/ContactsTest.php

49 lines
1.1 KiB
PHP
Raw Normal View History

2017-02-18 14:16:22 +00:00
<?php
namespace Tests\Feature;
use Tests\TestCase;
class ContactsTest extends TestCase
{
/**
2017-02-18 14:31:00 +00:00
* Check the `/contacts` page gives a good response.
2017-02-18 14:16:22 +00:00
*
* @return void
*/
public function test_contacts_page()
{
$response = $this->get('/contacts');
$response->assertStatus(200);
}
/**
* Test an individual contact page with default profile image.
*
* @return void
*/
public function test_contact_page_with_default_pic()
{
$response = $this->get('/contacts/tantek');
$response->assertViewHas('image', '/assets/profile-images/default-image');
}
/**
* Test an individual contact page with a specific profile image.
*
* @return void
*/
public function test_contact_page_with_specific_pic()
{
2017-02-18 15:06:11 +00:00
$response = $this->get('/contacts/aaron');
2017-02-18 14:16:22 +00:00
$response->assertViewHas('image', '/assets/profile-images/aaronparecki.com/image');
}
/** @test */
public function unknownContactGives404()
{
$response = $this->get('/contacts/unknown');
$response->assertNotFound();
}
2017-02-18 14:16:22 +00:00
}