コード例 #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');
 }
コード例 #2
0
 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');
 }
コード例 #3
0
ファイル: WPQueriesTest.php プロジェクト: lucatume/wp-browser
 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' => []];
 }
コード例 #4
0
ファイル: Module.php プロジェクト: namnv609/Codeception
 protected function hasModule($name)
 {
     return $this->moduleContainer->hasModule($name);
 }