Ejemplo n.º 1
0
 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');
 }
Ejemplo n.º 3
0
 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' => []];
 }
Ejemplo n.º 4
0
 protected function hasModule($name)
 {
     return $this->moduleContainer->hasModule($name);
 }