public function testShortConfigDependencies() { $config = ['modules' => ['enabled' => [['Codeception\\Lib\\DependencyModule' => ['depends' => 'Codeception\\Lib\\ConflictedModule']]]]]; $this->moduleContainer = new ModuleContainer(Stub::make('Codeception\\Lib\\Di'), $config); $this->moduleContainer->create('Codeception\\Lib\\DependencyModule'); $this->moduleContainer->hasModule('\\Codeception\\Lib\\DependencyModule'); }
public function testInjectModuleIntoHelper() { $config = ['modules' => ['enabled' => ['Codeception\\Lib\\HelperModule']]]; $this->moduleContainer = new ModuleContainer(Stub::make('Codeception\\Lib\\Di'), $config); $this->moduleContainer->create('Codeception\\Lib\\HelperModule'); $this->moduleContainer->hasModule('Codeception\\Lib\\HelperModule'); }
protected function _before() { $this->moduleContainer = $this->prophesize('Codeception\\Lib\\ModuleContainer'); $this->moduleContainer->hasModule('WPLoader')->willReturn(true); $this->moduleContainer->hasModule('WPBootstrapper')->willReturn(true); $this->constants = $this->prophesize('tad\\WPBrowser\\Environment\\Constants'); $this->wpdb = (object) ['queries' => []]; }
protected function hasModule($name) { return $this->moduleContainer->hasModule($name); }