예제 #1
0
 protected function setUp()
 {
     $this->testDb = new TestPgDb("ninkaSched" . time());
     $this->dbManager = $this->testDb->getDbManager();
     $this->licenseDao = new LicenseDao($this->dbManager);
     $logger = new Logger("NinkaSchedulerTest");
     $this->uploadPermDao = \Mockery::mock(UploadPermissionDao::classname());
     $this->uploadDao = new UploadDao($this->dbManager, $logger, $this->uploadPermDao);
 }
예제 #2
0
 protected function setUp()
 {
     $this->testDb = new TestPgDb("monkBulk");
     $this->dbManager = $this->testDb->getDbManager();
     $this->licenseDao = new LicenseDao($this->dbManager);
     $logger = new Logger("MonkBulkTest");
     $this->uploadPermDao = \Mockery::mock(UploadPermissionDao::classname());
     $this->uploadDao = new UploadDao($this->dbManager, $logger, $this->uploadPermDao);
     $this->highlightDao = new HighlightDao($this->dbManager);
     $this->clearingDao = new ClearingDao($this->dbManager, $this->uploadDao);
 }
예제 #3
0
 protected function setUp()
 {
     $this->testDb = new TestPgDb("monkSched");
     $this->dbManager = $this->testDb->getDbManager();
     $this->licenseDao = new LicenseDao($this->dbManager);
     $logger = new Logger("SchedulerTest");
     $this->uploadPermDao = \Mockery::mock(UploadPermissionDao::classname());
     $this->uploadDao = new UploadDao($this->dbManager, $logger, $this->uploadPermDao);
     $this->highlightDao = new HighlightDao($this->dbManager);
     $this->clearingDao = new ClearingDao($this->dbManager, $this->uploadDao);
     $this->agentDir = dirname(dirname(__DIR__));
 }
예제 #4
0
 protected function setUp()
 {
     $this->testDb = new TestPgDb("reuserSched");
     $this->dbManager = $this->testDb->getDbManager();
     $this->licenseDao = new LicenseDao($this->dbManager);
     $logger = new Logger("ReuserSchedulerTest");
     $this->uploadPermDao = \Mockery::mock(UploadPermissionDao::classname());
     $this->uploadDao = new UploadDao($this->dbManager, $logger, $this->uploadPermDao);
     $this->highlightDao = new HighlightDao($this->dbManager);
     $this->clearingDecisionFilter = new ClearingDecisionFilter();
     $this->clearingDao = new ClearingDao($this->dbManager, $this->uploadDao);
     $this->treeDao = \Mockery::mock(TreeDao::classname());
     $agentDao = new AgentDao($this->dbManager, $logger);
     $this->runnerMock = new SchedulerTestRunnerMock($this->dbManager, $agentDao, $this->clearingDao, $this->uploadDao, $this->clearingDecisionFilter, $this->treeDao);
     $this->runnerCli = new SchedulerTestRunnerCli($this->testDb);
 }
예제 #5
0
 protected function setUp()
 {
     $this->testDb = new TestPgDb("deciderJobSched" . time());
     $this->dbManager = $this->testDb->getDbManager();
     $logger = M::mock('Monolog\\Logger');
     $this->licenseDao = new LicenseDao($this->dbManager);
     $this->uploadPermDao = \Mockery::mock(UploadPermissionDao::classname());
     $this->uploadDao = new UploadDao($this->dbManager, $logger, $this->uploadPermDao);
     $this->highlightDao = new HighlightDao($this->dbManager);
     $agentDao = new AgentDao($this->dbManager, $logger);
     $this->agentLicenseEventProcessor = new AgentLicenseEventProcessor($this->licenseDao, $agentDao);
     $clearingEventProcessor = new ClearingEventProcessor();
     $this->clearingDao = new ClearingDao($this->dbManager, $this->uploadDao);
     $this->clearingDecisionProcessor = new ClearingDecisionProcessor($this->clearingDao, $this->agentLicenseEventProcessor, $clearingEventProcessor, $this->dbManager);
     $this->runnerMock = new SchedulerTestRunnerMock($this->dbManager, $agentDao, $this->clearingDao, $this->uploadDao, $this->highlightDao, $this->clearingDecisionProcessor, $this->agentLicenseEventProcessor);
     $this->runnerCli = new SchedulerTestRunnerCli($this->testDb);
 }
예제 #6
0
 protected function setUp()
 {
     $this->testDb = new TestPgDb("deciderSched");
     $this->dbManager = $this->testDb->getDbManager();
     $this->licenseDao = new LicenseDao($this->dbManager);
     $logger = M::mock('Monolog\\Logger');
     $this->uploadPermDao = \Mockery::mock(UploadPermissionDao::classname());
     $this->uploadDao = new UploadDao($this->dbManager, $logger, $this->uploadPermDao);
     $this->highlightDao = new HighlightDao($this->dbManager);
     $agentDao = new AgentDao($this->dbManager, $logger);
     $this->agentLicenseEventProcessor = new AgentLicenseEventProcessor($this->licenseDao, $agentDao);
     $clearingEventProcessor = new ClearingEventProcessor();
     $this->clearingDao = new ClearingDao($this->dbManager, $this->uploadDao);
     $this->clearingDecisionProcessor = new ClearingDecisionProcessor($this->clearingDao, $this->agentLicenseEventProcessor, $clearingEventProcessor, $this->dbManager);
     global $container;
     $container = M::mock('ContainerBuilder');
     $container->shouldReceive('get')->withArgs(array('db.manager'))->andReturn($this->dbManager);
     $this->runnerMock = new SchedulerTestRunnerMock($this->dbManager, $agentDao, $this->clearingDao, $this->uploadDao, $this->highlightDao, $this->clearingDecisionProcessor, $this->agentLicenseEventProcessor);
     $this->runnerCli = new SchedulerTestRunnerCli($this->testDb);
 }