Pantheon\Terminus\UnitTests\Models\LockTest::_getLock PHP Method

_getLock() protected method

protected _getLock ( $attr )
    protected function _getLock($attr)
    {
        $this->workflows = $this->getMockBuilder(Workflows::class)->disableOriginalConstructor()->getMock();
        $this->environment = $this->getMockBuilder(Environment::class)->disableOriginalConstructor()->getMock();
        $this->environment->method('getWorkflows')->willReturn($this->workflows);
        $lock = new Lock((object) $attr, ['environment' => $this->environment]);
        return $lock;
    }