public function setUp()
 {
     parent::setUp();
     $this->checker = m::mock(ActivityCsvFieldChecker::class);
     $this->parser = m::mock(ActivityDataParser::class);
     $this->simpleActivityRow = new SimpleActivityRow($this->checker, $this->parser);
 }
 public function setUp()
 {
     parent::setUp();
     $this->simpleActivityRow = m::mock(SimpleActivityRow::class);
     $this->excelReader = m::mock(LaravelExcelReader::class);
     $this->simpleActivity = new SimpleActivity($this->simpleActivityRow);
 }
 public function setUp()
 {
     parent::setUp();
     $this->transactionModel = m::mock(Transaction::class);
     $this->csvReader = m::mock(CsvReader::class);
     $this->transactionRepo = m::mock(TransactionRepo::class);
     $this->uploadTransactionRepo = new UploadTransaction($this->transactionModel, $this->transactionRepo, $this->csvReader);
 }
 public function setUp()
 {
     parent::setUp();
     $this->version = m::mock(Version::class);
     $this->auth = m::mock(Guard::class);
     $this->dbLogger = m::mock(DbLogger::class);
     $this->logger = m::mock(Logger::class);
     $this->transactionRepo = m::mock(Transaction::class);
     $this->version->shouldReceive('getActivityElement->getTransaction->getRepository')->andReturn($this->transactionRepo);
     $this->transactionManager = new TransactionManager($this->version, $this->auth, $this->dbLogger, $this->logger);
 }
 public function setUp()
 {
     parent::setUp();
     $this->activityDataParserMock = m::mock(ActivityDataParser::class);
     $this->activityModel = m::mock(Activity::class);
     $this->organizationModel = m::mock(Organization::class);
     $this->settingsModel = m::mock(Settings::class);
     $this->activityDataParser = new ActivityDataParser($this->activityModel, $this->organizationModel, $this->settingsModel);
     $this->settingsModel->shouldReceive('where->first')->andReturn($this->settingsModel);
     $this->settingsModel->shouldReceive('getAttribute')->with('default_field_values')->once()->andReturn($this->defaultFieldGroups);
     $this->activityDataParser->init($this->activity);
 }
 public function setUp()
 {
     parent::setUp();
     $this->simpleActivityParser = m::mock(SimpleActivity::class);
     $this->simpleActivityDemoParser = m::mock(SimpleActivityDemo::class);
     $this->version = m::mock(Version::class);
     $this->logger = m::mock(Log::class);
     $this->excelReader = m::mock(LaravelExcelReader::class);
     $this->importActivityMock = m::mock(ImportActivity::class);
     $this->database = m::mock(DatabaseManager::class);
     $this->orgManager = m::mock(OrganizationManager::class);
     $this->version->shouldReceive('getActivityElement->getSimpleActivityParser')->andReturn($this->simpleActivityParser);
     $this->version->shouldReceive('getActivityElement->getSimpleActivityDemoParser')->andReturn($this->simpleActivityDemoParser);
     $this->importActivity = new ImportActivity($this->version, $this->logger, $this->orgManager);
 }
Ejemplo n.º 7
0
 public function tearDown()
 {
     parent::tearDown();
     m::close();
 }
Ejemplo n.º 8
0
 public function setUp()
 {
     parent::setUp();
     $this->transactionModel = m::mock(Transaction::class);
     $this->transactionRepo = new TransactionRepo($this->transactionModel);
 }