Initial commit to new repo
This commit is contained in:
parent
a267f9bfcc
commit
a5173c981b
292 changed files with 17472 additions and 0 deletions
52
tests/ContactsTest.php
Normal file
52
tests/ContactsTest.php
Normal 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">');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue