Skip to content

Instantly share code, notes, and snippets.

@danielpereirabp
Created December 8, 2015 15:45
Show Gist options
  • Save danielpereirabp/5be8a3e822e7efdc4e5d to your computer and use it in GitHub Desktop.
Save danielpereirabp/5be8a3e822e7efdc4e5d to your computer and use it in GitHub Desktop.
<?php
use Mockery as m;
class ProjectRepositoryTest extends TestCase
{
public function testShouldCheckIfIsOwner()
{
$mock = m::mock('CodeProject\Repositories\ProjectRepository[findWhere]');
$mock->shouldReceive('findWhere')->once()->andReturn(true);
$isOwner = $mock->isOwner(1, 1);
$this->assertTrue($isOwner);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment