public function testIncrement() { list($repo, $itemRepo) = $this->getMocks(); $instance = new CategoryHandler($repo, $itemRepo); $mockEntity = m::mock('Xpressengine\\Category\\CategoryEntity'); $repo->shouldReceive('increment')->once()->with($mockEntity, 1)->andReturn(1); $instance->increment($mockEntity); }