Bolt\Tests\Nut\UserRoleRemoveTest::getUserMockWithReturns PHP Method

getUserMockWithReturns() protected method

protected getUserMockWithReturns ( $remove = false, $has = false )
    protected function getUserMockWithReturns($remove = false, $has = false)
    {
        /** @var \PHPUnit_Framework_MockObject_MockObject $users */
        $users = $this->getMockUsers(['hasRole', 'removeRole']);
        $users->expects($this->any())->method('removeRole')->will($this->returnValue($remove));
        $users->expects($this->any())->method('hasRole')->will($this->returnValue($has));
        return $users;
    }