Initial commit to new repo

This commit is contained in:
Jonny Barnes 2016-05-19 15:01:28 +01:00
parent a267f9bfcc
commit a5173c981b
292 changed files with 17472 additions and 0 deletions

52
tests/ContactsTest.php Normal file
View file

@ -0,0 +1,52 @@
<?php
namespace App\Tests;
use TestCase;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class ContactsTest extends TestCase
{
protected $appurl;
public function setUp()
{
parent::setUp();
$this->appurl = config('app.url');
}
/**
* Test the `/contacts` page and see if response is OK.
*
* @return void
*/
public function testContactsPage()
{
$this->visit($this->appurl . '/contacts')
->assertResponseOK();
}
/**
* Test an individual contact page with default profile image.
*
* @return void
*/
public function testContactPageWithDefaultPic()
{
$this->visit($this->appurl . '/contacts/tantek')
->see('<img src="/assets/profile-images/default-image" alt="" class="u-photo">');
}
/**
* Test an individual contact page with a specific profile image.
*
* @return void
*/
public function testContactPageWithSpecificPic()
{
$this->visit($this->appurl . '/contacts/aaron')
->see('<img src="/assets/profile-images/aaronparecki.com/image" alt="" class="u-photo">');
}
}