當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Session::stop方法代碼示例

本文整理匯總了PHP中Behat\Mink\Session::stop方法的典型用法代碼示例。如果您正苦於以下問題:PHP Session::stop方法的具體用法?PHP Session::stop怎麽用?PHP Session::stop使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Behat\Mink\Session的用法示例。


在下文中一共展示了Session::stop方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: stopMinkSession

 /**
  * Shut down the Mink session.
  *
  * @return void
  */
 protected function stopMinkSession()
 {
     if (!empty($this->session)) {
         $this->session->stop();
         $this->session = null;
     }
 }
開發者ID:grharry,項目名稱:vufind,代碼行數:12,代碼來源:MinkTestCase.php

示例2: shoot

 /**
  *
  * @return array
  */
 public function shoot()
 {
     $this->_session = $this->_camera->get_session();
     // Iterate over shots
     foreach ($this->_shots as $shot) {
         /* @var $shot Shot */
         $output = $this->_shoot_shot($shot);
         $this->_log_out("Saving as " . $this->_film->get_root_folder() . $shot->get_destination_file());
         // Save output in folder
         if (empty($output)) {
             $this->_log_out("There was an error capturing this page. Please, check or retry. ");
             continue;
         }
         $saved_result = $this->_film->get_filesystem()->put($shot->get_destination_file(), $output);
         if (!$saved_result) {
             $this->_log_out("There was an error saving the screenshot. Please, check or retry. ");
             continue;
         }
         // It was successful, mark it
         $shot->set_completed(true);
     }
     // If session is open (it should) just close it
     if ($this->_session->isStarted()) {
         $this->_session->stop();
     }
     return $this->_shots;
 }
開發者ID:pachico,項目名稱:voyeur,代碼行數:31,代碼來源:Voyeur.php

示例3: stopSession

 /**
  * Stops session.
  *
  * @return void
  */
 protected function stopSession()
 {
     if ($this->_session === null) {
         return;
     }
     $this->_session->stop();
     $this->_session = null;
 }
開發者ID:aik099,項目名稱:phpunit-mink,代碼行數:13,代碼來源:SharedSessionStrategy.php

示例4: _after

 public function _after(\Codeception\TestCase $test)
 {
     //that call does not really terminate node process
     //@see https://github.com/symfony/symfony/issues/5499
     $this->session->stop();
     //so we kill it ourselves
     exec('killall ' . pathinfo($this->server->getNodeBin(), PATHINFO_BASENAME) . ' > /dev/null 2>&1');
 }
開發者ID:NaszvadiG,項目名稱:ImageCMS,代碼行數:8,代碼來源:ZombieJS.php

示例5: testStop

 public function testStop()
 {
     $this->driver->expects($this->once())->method('stop');
     $this->session->stop();
 }
開發者ID:saberyounis,項目名稱:Sonata-Project,代碼行數:5,代碼來源:SessionTest.php

示例6: _after

 public function _after(TestCase $test)
 {
     $this->session->stop();
 }
開發者ID:lenninsanchez,項目名稱:donadores,代碼行數:4,代碼來源:Mink.php

示例7: _after

 public function _after(\Codeception\TestCase $test)
 {
     $this->session->stop();
 }
開發者ID:NaszvadiG,項目名稱:ImageCMS,代碼行數:4,代碼來源:Mink.php

示例8: Session

<?php

require __DIR__ . '/vendor/autoload.php';
use Behat\Mink\Driver\GoutteDriver;
use Behat\Mink\Driver\Selenium2Driver;
use Behat\Mink\Session;
//$driver = new GoutteDriver();
$driver = new Selenium2Driver();
$session = new Session($driver);
$session->start();
$session->visit('http://jurassicpark.wikia.com');
//echo "The status code is ".$session->getStatusCode()."\n";
echo "The current URL is " . $session->getCurrentUrl() . "\n";
// Hallo! I'm a DocumentElement
$page = $session->getPage();
echo "The start of the page text is " . substr($page->getText(), 0, 56) . "\n";
// And I'm a NodeElement!
$nodeElement = $page->find('css', '.subnav-2 li a');
echo "The matched link text is " . $nodeElement->getText() . "\n";
$randomLink = $page->findLink('Random page');
echo "The matched URL is " . $randomLink->getAttribute('href') . "\n";
$randomLink->click();
echo "The new URL is " . $session->getCurrentUrl() . "\n";
$session->stop();
開發者ID:vinodpanicker,項目名稱:behat,代碼行數:24,代碼來源:mink-playground.php

示例9: iCloseTheSession

 /**
  * @Then /^I close the session$/
  */
 public function iCloseTheSession()
 {
     $this->session->stop();
 }
開發者ID:Niggu,項目名稱:cloudrexx,代碼行數:7,代碼來源:FeatureContext.php

示例10: tearDown

 public function tearDown()
 {
     $this->session->stop();
 }
開發者ID:rpkamp,項目名稱:rafflers,代碼行數:4,代碼來源:Raffler.php


注:本文中的Behat\Mink\Session::stop方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。