Exemple #1
0
 public function setUp()
 {
     $connector = new \Codeception\Lib\Connector\Universal();
     $connector->setIndex(\Codeception\Configuration::dataDir() . '/rest/index.php');
     $connectionModule = new \Codeception\Module\UniversalFramework(make_container());
     $connectionModule->client = $connector;
     $connectionModule->_initialize();
     $this->module = Stub::make('\\Codeception\\Module\\REST');
     $this->module->_inject($connectionModule);
     $this->module->_initialize();
     $this->module->_before(Stub::makeEmpty('\\Codeception\\TestCase\\Cest'));
     $this->module->client->setServerParameters(['SCRIPT_FILENAME' => 'index.php', 'SCRIPT_NAME' => 'index', 'SERVER_NAME' => 'localhost', 'SERVER_PROTOCOL' => 'http']);
 }
 /**
  * @group core
  */
 public function testActionsExplicitlySetForNotInheritedModule()
 {
     \Codeception\Module\UniversalFramework::$onlyActions = ['see'];
     $this->moduleContainer->create('\\Codeception\\Module\\UniversalFramework');
     $actions = $this->moduleContainer->getActions();
     $this->assertArrayNotHasKey('amOnPage', $actions);
     $this->assertArrayHasKey('see', $actions);
 }
 protected function tearDown()
 {
     \Codeception\Module\UniversalFramework::$includeInheritedActions = true;
     \Codeception\Module\UniversalFramework::$onlyActions = [];
     \Codeception\Module\UniversalFramework::$excludeActions = [];
 }