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