Skip to content

Instantly share code, notes, and snippets.

@ekrembk
Created August 3, 2013 15:13
Show Gist options
  • Save ekrembk/6146785 to your computer and use it in GitHub Desktop.
Save ekrembk/6146785 to your computer and use it in GitHub Desktop.
<?php
use Ekrembk\Repositories\EloquentLinkRepository;
class EloquentLinkRepositoryTest extends TestCase {
public function __construct()
{
$this->mockEloquent = Mockery::mock('alias:Ekrembk\Link');
}
public function tearDown()
{
Mockery::close();
}
public function testTumuMethoduEloquenttenAldigiVerileriDegistirmedenDonduruyor()
{
$eloquentDongu = 'sahte dongu';
$this->mockEloquent->shouldReceive('all')
->once()
->andReturn($eloquentDongu);
$repo = new EloquentLinkRepository($this->mockEloquent);
$tumLinkler = $repo->tumu();
$this->assertEquals($eloquentDongu, $tumLinkler->all());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment