Created
August 3, 2013 15:13
-
-
Save ekrembk/6146785 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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