clean() public static method

public static clean ( )
Ejemplo n.º 1
0
 public function tearDown()
 {
     $this->noPhpWebserver();
     $this->noSelenium();
     $this->module->_after($this->makeTest());
     data::clean();
 }
Ejemplo n.º 2
0
 protected function tearDown()
 {
     if ($this->module) {
         $this->module->_after($this->makeTest());
     }
     data::clean();
 }
Ejemplo n.º 3
0
 public function testLoginToFacebook()
 {
     $this->markTestSkipped();
     // preconditions: #1 php web server being run
     $browserModule = new PhpBrowser();
     $browserModule->_setConfig(array('url' => 'http://localhost:8000'));
     $browserModule->_initialize();
     $browserModule->_cleanup();
     $browserModule->_before($this->makeTest());
     SuiteManager::$modules['PhpBrowser'] = $browserModule;
     // preconditions: #2 facebook test user was created
     $this->module->haveFacebookTestUserAccount();
     $testUserFirstName = $this->module->grabFacebookTestUserFirstName();
     // preconditions: #3 test user logged in on facebook
     $this->module->haveTestUserLoggedInOnFacebook();
     // go to our page with facebook login button
     $browserModule->amOnPage('/facebook');
     // check that yet we are not logged in with facebook
     $browserModule->see('You are not Connected.');
     // click on "Login with Facebook" button to start login with facebook
     $browserModule->click('Login with Facebook');
     // check that we are logged in with facebook
     $browserModule->see('Your User Object (/me)');
     $browserModule->see($testUserFirstName);
     // cleanup
     unset(SuiteManager::$modules['PhpBrowser']);
     $browserModule->_after($this->makeTest());
     data::clean();
 }
Ejemplo n.º 4
0
 public function _after()
 {
     data::clean();
 }
Ejemplo n.º 5
0
 public function tearDown()
 {
     data::clean();
 }
Ejemplo n.º 6
0
 public function testLoginToFacebook()
 {
     if (PHP_MAJOR_VERSION < 7 && getenv('TRAVIS')) {
         $this->markTestSkipped('run only one thread on Travis');
     }
     // precondition: you need to have a server running for this test
     // you can start a php server with: php -S 127.0.0.1:8000 -t tests/data/app
     $browserModule = new PhpBrowser(make_container());
     $this->initModule($browserModule, ['url' => 'http://localhost:8000']);
     $this->module->_inject($browserModule);
     $this->loginToFacebook($browserModule);
     // cleanup
     $browserModule->_after($this->makeTest());
     data::clean();
 }
Ejemplo n.º 7
0
 public function testLoginToFacebook()
 {
     // precondition: you need to have a server running for this test
     // you can start a php server with: php -S 127.0.0.1:8000 -t tests/data/app
     $browserModule = new PhpBrowser($this->makeContainer());
     $this->initModule($browserModule, ['url' => 'http://localhost:8000']);
     $this->module->_inject($browserModule);
     $this->loginToFacebook($browserModule);
     // cleanup
     $browserModule->_after($this->makeTest());
     data::clean();
 }