public function setup() { parent::setup(); $this->activity = m::mock(Activity::class); $this->version = m::mock(Version::class); $this->conditionRepository = m::mock(Condition::class); $this->logger = m::mock(LoggerInterface::class); $this->version->shouldReceive('getActivityElement->getCondition->getRepository')->andReturn($this->conditionRepository); $this->dbLogger = m::mock(Log::class); $this->auth = m::mock(Guard::class); $this->conditionManager = new ConditionManager($this->version, $this->dbLogger, $this->auth, $this->logger); }