public function testConflictsByInterface() { $this->setExpectedException('Codeception\\Exception\\ModuleConflictException'); $this->moduleContainer->create('Codeception\\Lib\\ConflictedModule3'); $this->moduleContainer->create('Symfony2'); $this->moduleContainer->validateConflicts(); }
public function testNoConflictsForPartedModules() { $config = ['modules' => ['config' => ['Laravel5' => ['part' => 'ORM']]]]; $this->moduleContainer = new ModuleContainer(Stub::make('Codeception\\Lib\\Di'), $config); $this->moduleContainer->create('Laravel5'); $this->moduleContainer->create('Symfony2'); $this->moduleContainer->validateConflicts(); }
public function __construct(EventDispatcher $dispatcher, $name, array $settings) { $this->settings = $settings; $this->dispatcher = $dispatcher; $this->di = new Di(); $this->path = $settings['path']; $this->groupManager = new GroupManager($settings['groups']); $this->moduleContainer = new ModuleContainer($this->di, $settings); $modules = Configuration::modules($this->settings); foreach ($modules as $moduleName) { $this->moduleContainer->create($moduleName); } $this->moduleContainer->validateConflicts(); if (isset($settings['current_environment'])) { $this->env = $settings['current_environment']; } $this->suite = $this->createSuite($name); }