当前位置: 首页>>代码示例>>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;未经允许,请勿转载。