Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663
This commit is contained in:
parent
eb34d130a8
commit
f32e58e4b1
8476 changed files with 211648 additions and 170042 deletions
37
vendor/behat/mink-browserkit-driver/tests/BrowserKitConfig.php
vendored
Normal file
37
vendor/behat/mink-browserkit-driver/tests/BrowserKitConfig.php
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
namespace Behat\Mink\Tests\Driver;
|
||||
|
||||
use Behat\Mink\Driver\BrowserKitDriver;
|
||||
use Symfony\Component\HttpKernel\Client;
|
||||
|
||||
class BrowserKitConfig extends AbstractConfig
|
||||
{
|
||||
public static function getInstance()
|
||||
{
|
||||
return new self();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function createDriver()
|
||||
{
|
||||
$client = new Client(require(__DIR__.'/app.php'));
|
||||
|
||||
return new BrowserKitDriver($client);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getWebFixturesUrl()
|
||||
{
|
||||
return 'http://localhost';
|
||||
}
|
||||
|
||||
protected function supportsJs()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
24
vendor/behat/mink-browserkit-driver/tests/Custom/BaseUrlTest.php
vendored
Normal file
24
vendor/behat/mink-browserkit-driver/tests/Custom/BaseUrlTest.php
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
namespace Behat\Mink\Tests\Driver\Custom;
|
||||
|
||||
use Behat\Mink\Driver\BrowserKitDriver;
|
||||
use Behat\Mink\Session;
|
||||
use Symfony\Component\HttpKernel\Client;
|
||||
|
||||
/**
|
||||
* @group functional
|
||||
*/
|
||||
class BaseUrlTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testBaseUrl()
|
||||
{
|
||||
$client = new Client(require(__DIR__.'/../app.php'));
|
||||
$driver = new BrowserKitDriver($client, 'http://localhost/foo/');
|
||||
$session = new Session($driver);
|
||||
|
||||
$session->visit('http://localhost/foo/index.html');
|
||||
$this->assertEquals(200, $session->getStatusCode());
|
||||
$this->assertEquals('http://localhost/foo/index.html', $session->getCurrentUrl());
|
||||
}
|
||||
}
|
181
vendor/behat/mink-browserkit-driver/tests/Custom/ErrorHandlingTest.php
vendored
Normal file
181
vendor/behat/mink-browserkit-driver/tests/Custom/ErrorHandlingTest.php
vendored
Normal file
|
@ -0,0 +1,181 @@
|
|||
<?php
|
||||
|
||||
namespace Behat\Mink\Tests\Driver\Custom;
|
||||
|
||||
use Behat\Mink\Driver\BrowserKitDriver;
|
||||
use Symfony\Component\BrowserKit\Client;
|
||||
use Symfony\Component\BrowserKit\Response;
|
||||
|
||||
class ErrorHandlingTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var TestClient
|
||||
*/
|
||||
private $client;
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
$this->client = new TestClient();
|
||||
}
|
||||
|
||||
public function testGetClient()
|
||||
{
|
||||
$this->assertSame($this->client, $this->getDriver()->getClient());
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Behat\Mink\Exception\DriverException
|
||||
* @expectedExceptionMessage Unable to access the response before visiting a page
|
||||
*/
|
||||
public function testGetResponseHeaderWithoutVisit()
|
||||
{
|
||||
$this->getDriver()->getResponseHeaders();
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Behat\Mink\Exception\DriverException
|
||||
* @expectedExceptionMessage Unable to access the response content before visiting a page
|
||||
*/
|
||||
public function testFindWithoutVisit()
|
||||
{
|
||||
$this->getDriver()->find('//html');
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Behat\Mink\Exception\DriverException
|
||||
* @expectedExceptionMessage Unable to access the request before visiting a page
|
||||
*/
|
||||
public function testGetCurrentUrlWithoutVisit()
|
||||
{
|
||||
$this->getDriver()->getCurrentUrl();
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Behat\Mink\Exception\DriverException
|
||||
* @expectedExceptionMessage The selected node has an invalid form attribute (foo)
|
||||
*/
|
||||
public function testNotMatchingHtml5FormId()
|
||||
{
|
||||
$html = <<<'HTML'
|
||||
<html>
|
||||
<body>
|
||||
<form id="test">
|
||||
<input name="test" value="foo" form="foo">
|
||||
<input type="submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
HTML;
|
||||
|
||||
$this->client->setNextResponse(new Response($html));
|
||||
|
||||
$driver = $this->getDriver();
|
||||
$driver->visit('/index.php');
|
||||
$driver->setValue('//input[./@name="test"]', 'bar');
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Behat\Mink\Exception\DriverException
|
||||
* @expectedExceptionMessage The selected node has an invalid form attribute (foo)
|
||||
*/
|
||||
public function testInvalidHtml5FormId()
|
||||
{
|
||||
$html = <<<'HTML'
|
||||
<html>
|
||||
<body>
|
||||
<form id="test">
|
||||
<input name="test" value="foo" form="foo">
|
||||
<input type="submit">
|
||||
</form>
|
||||
<div id="foo"></div>
|
||||
</body>
|
||||
</html>
|
||||
HTML;
|
||||
|
||||
$this->client->setNextResponse(new Response($html));
|
||||
|
||||
$driver = $this->getDriver();
|
||||
$driver->visit('/index.php');
|
||||
$driver->setValue('//input[./@name="test"]', 'bar');
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Behat\Mink\Exception\DriverException
|
||||
* @expectedExceptionMessage The selected node does not have a form ancestor.
|
||||
*/
|
||||
public function testManipulateInputWithoutForm()
|
||||
{
|
||||
$html = <<<'HTML'
|
||||
<html>
|
||||
<body>
|
||||
<form id="test">
|
||||
<input type="submit">
|
||||
</form>
|
||||
<div id="foo">
|
||||
<input name="test" value="foo">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
HTML;
|
||||
|
||||
$this->client->setNextResponse(new Response($html));
|
||||
|
||||
$driver = $this->getDriver();
|
||||
$driver->visit('/index.php');
|
||||
$driver->setValue('//input[./@name="test"]', 'bar');
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Behat\Mink\Exception\DriverException
|
||||
* @expectedExceptionMessage Behat\Mink\Driver\BrowserKitDriver supports clicking on links and submit or reset buttons only. But "div" provided
|
||||
*/
|
||||
public function testClickOnUnsupportedElement()
|
||||
{
|
||||
$html = <<<'HTML'
|
||||
<html>
|
||||
<body>
|
||||
<div></div>
|
||||
</body>
|
||||
</html>
|
||||
HTML;
|
||||
|
||||
$this->client->setNextResponse(new Response($html));
|
||||
|
||||
$driver = $this->getDriver();
|
||||
$driver->visit('/index.php');
|
||||
$driver->click('//div');
|
||||
}
|
||||
|
||||
private function getDriver()
|
||||
{
|
||||
return new BrowserKitDriver($this->client);
|
||||
}
|
||||
}
|
||||
|
||||
class TestClient extends Client
|
||||
{
|
||||
protected $nextResponse = null;
|
||||
protected $nextScript = null;
|
||||
|
||||
public function setNextResponse(Response $response)
|
||||
{
|
||||
$this->nextResponse = $response;
|
||||
}
|
||||
|
||||
public function setNextScript($script)
|
||||
{
|
||||
$this->nextScript = $script;
|
||||
}
|
||||
|
||||
protected function doRequest($request)
|
||||
{
|
||||
if (null === $this->nextResponse) {
|
||||
return new Response();
|
||||
}
|
||||
|
||||
$response = $this->nextResponse;
|
||||
$this->nextResponse = null;
|
||||
|
||||
return $response;
|
||||
}
|
||||
}
|
37
vendor/behat/mink-browserkit-driver/tests/app.php
vendored
Normal file
37
vendor/behat/mink-browserkit-driver/tests/app.php
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
namespace app;
|
||||
|
||||
$app = new \Silex\Application();
|
||||
$app->register(new \Silex\Provider\SessionServiceProvider());
|
||||
|
||||
$def = realpath(__DIR__.'/../vendor/behat/mink/driver-testsuite/web-fixtures');
|
||||
$ovr = realpath(__DIR__.'/web-fixtures');
|
||||
$cbk = function ($file) use ($app, $def, $ovr) {
|
||||
$file = str_replace('.file', '.php', $file);
|
||||
$path = file_exists($ovr.'/'.$file) ? $ovr.'/'.$file : $def.'/'.$file;
|
||||
$resp = null;
|
||||
|
||||
ob_start();
|
||||
include($path);
|
||||
$content = ob_get_clean();
|
||||
|
||||
if ($resp) {
|
||||
if ('' === $resp->getContent()) {
|
||||
$resp->setContent($content);
|
||||
}
|
||||
|
||||
return $resp;
|
||||
}
|
||||
|
||||
return $content;
|
||||
};
|
||||
|
||||
$app->get('/{file}', $cbk)->assert('file', '.*');
|
||||
$app->post('/{file}', $cbk)->assert('file', '.*');
|
||||
|
||||
$app['debug'] = true;
|
||||
$app['exception_handler']->disable();
|
||||
$app['session.test'] = true;
|
||||
|
||||
return $app;
|
3
vendor/behat/mink-browserkit-driver/tests/web-fixtures/404.php
vendored
Normal file
3
vendor/behat/mink-browserkit-driver/tests/web-fixtures/404.php
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
|
||||
$resp = new Symfony\Component\HttpFoundation\Response('Sorry, page not found', 404);
|
3
vendor/behat/mink-browserkit-driver/tests/web-fixtures/500.php
vendored
Normal file
3
vendor/behat/mink-browserkit-driver/tests/web-fixtures/500.php
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
|
||||
$resp = new Symfony\Component\HttpFoundation\Response('Sorry, a server error happened', 500);
|
32
vendor/behat/mink-browserkit-driver/tests/web-fixtures/advanced_form_post.php
vendored
Normal file
32
vendor/behat/mink-browserkit-driver/tests/web-fixtures/advanced_form_post.php
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
|
||||
<head>
|
||||
<title>Advanced form save</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
error_reporting(0);
|
||||
|
||||
$request = $app['request'];
|
||||
$POST = $request->request->all();
|
||||
$FILES = $request->files->all();
|
||||
|
||||
if (isset($POST['select_multiple_numbers']) && false !== strpos($POST['select_multiple_numbers'][0], ',')) {
|
||||
$POST['select_multiple_numbers'] = explode(',', $POST['select_multiple_numbers'][0]);
|
||||
}
|
||||
|
||||
// checkbox can have any value and will be successful in case "on"
|
||||
// http://www.w3.org/TR/html401/interact/forms.html#checkbox
|
||||
$POST['agreement'] = isset($POST['agreement']) ? 'on' : 'off';
|
||||
ksort($POST);
|
||||
echo str_replace('>', '', var_export($POST, true)) . "\n";
|
||||
if (isset($FILES['about']) && file_exists($FILES['about']->getPathname())) {
|
||||
echo $FILES['about']->getClientOriginalName() . "\n";
|
||||
echo file_get_contents($FILES['about']->getPathname());
|
||||
} else {
|
||||
echo "no file";
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
15
vendor/behat/mink-browserkit-driver/tests/web-fixtures/basic_auth.php
vendored
Normal file
15
vendor/behat/mink-browserkit-driver/tests/web-fixtures/basic_auth.php
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
$SERVER = $app['request']->server->all();
|
||||
|
||||
$username = isset($SERVER['PHP_AUTH_USER']) ? $SERVER['PHP_AUTH_USER'] : false;
|
||||
$password = isset($SERVER['PHP_AUTH_PW']) ? $SERVER['PHP_AUTH_PW'] : false;
|
||||
|
||||
if ($username == 'mink-user' && $password == 'mink-password') {
|
||||
echo 'is authenticated';
|
||||
} else {
|
||||
$resp = new \Symfony\Component\HttpFoundation\Response();
|
||||
$resp->setStatusCode(401);
|
||||
$resp->headers->set('WWW-Authenticate', 'Basic realm="Mink Testing Area"');
|
||||
|
||||
echo 'is not authenticated';
|
||||
}
|
14
vendor/behat/mink-browserkit-driver/tests/web-fixtures/basic_form_post.php
vendored
Normal file
14
vendor/behat/mink-browserkit-driver/tests/web-fixtures/basic_form_post.php
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?php ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
|
||||
<head>
|
||||
<title>Basic Form Saving</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Anket for <?php echo $app['request']->request->get('first_name') ?></h1>
|
||||
|
||||
<span id="first">Firstname: <?php echo $app['request']->request->get('first_name') ?></span>
|
||||
<span id="last">Lastname: <?php echo $app['request']->request->get('last_name') ?></span>
|
||||
</body>
|
||||
</html>
|
23
vendor/behat/mink-browserkit-driver/tests/web-fixtures/basic_get_form.php
vendored
Normal file
23
vendor/behat/mink-browserkit-driver/tests/web-fixtures/basic_get_form.php
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
|
||||
<head>
|
||||
<title>Basic Get Form</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Basic Get Form Page</h1>
|
||||
|
||||
<div id="serach">
|
||||
<?php
|
||||
$GET = $app['request']->query->all();
|
||||
echo isset($GET['q']) && $GET['q'] ? $GET['q'] : 'No search query'
|
||||
?>
|
||||
</div>
|
||||
|
||||
<form>
|
||||
<input name="q" value="" type="text" />
|
||||
|
||||
<input type="submit" value="Find" />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
17
vendor/behat/mink-browserkit-driver/tests/web-fixtures/cookie_page1.php
vendored
Normal file
17
vendor/behat/mink-browserkit-driver/tests/web-fixtures/cookie_page1.php
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
$resp = new Symfony\Component\HttpFoundation\Response();
|
||||
$cook = new Symfony\Component\HttpFoundation\Cookie('srvr_cookie', 'srv_var_is_set', 0, '/');
|
||||
$resp->headers->setCookie($cook);
|
||||
?>
|
||||
<!doctype html public "-//w3c//dtd xhtml 1.1//en" "http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
|
||||
<head>
|
||||
<title>basic form</title>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
||||
<script>
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
basic page with cookie set from server side
|
||||
</body>
|
||||
</html>
|
14
vendor/behat/mink-browserkit-driver/tests/web-fixtures/cookie_page2.php
vendored
Normal file
14
vendor/behat/mink-browserkit-driver/tests/web-fixtures/cookie_page2.php
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
|
||||
<head>
|
||||
<title>Basic Form</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
|
||||
<script>
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
Previous cookie: <?php
|
||||
echo $app['request']->cookies->has('srvr_cookie') ? $app['request']->cookies->get('srvr_cookie') : 'NO';
|
||||
?>
|
||||
</body>
|
||||
</html>
|
20
vendor/behat/mink-browserkit-driver/tests/web-fixtures/cookie_page3.php
vendored
Normal file
20
vendor/behat/mink-browserkit-driver/tests/web-fixtures/cookie_page3.php
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
$hasCookie = $app['request']->cookies->has('foo');
|
||||
$resp = new Symfony\Component\HttpFoundation\Response();
|
||||
$cook = new Symfony\Component\HttpFoundation\Cookie('foo', 'bar');
|
||||
$resp->headers->setCookie($cook);
|
||||
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
|
||||
<head>
|
||||
<title>HttpOnly Cookie Test</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
|
||||
<script>
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="cookie-status">Has Cookie: <?php echo json_encode($hasCookie) ?></div>
|
||||
</body>
|
||||
</html>
|
10
vendor/behat/mink-browserkit-driver/tests/web-fixtures/headers.php
vendored
Normal file
10
vendor/behat/mink-browserkit-driver/tests/web-fixtures/headers.php
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
|
||||
<head>
|
||||
<title>Headers page</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
|
||||
</head>
|
||||
<body>
|
||||
<?php print_r($app['request']->server->all()); ?>
|
||||
</body>
|
||||
</html>
|
14
vendor/behat/mink-browserkit-driver/tests/web-fixtures/issue130.php
vendored
Normal file
14
vendor/behat/mink-browserkit-driver/tests/web-fixtures/issue130.php
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<html>
|
||||
<body>
|
||||
<?php
|
||||
if ('1' === $app['request']->query->get('p')) {
|
||||
echo '<a href="/issue130.php?p=2">Go to 2</a>';
|
||||
} else {
|
||||
echo '<strong>'.$app['request']->headers->get('referer').'</strong>';
|
||||
}
|
||||
?>
|
||||
</body>
|
20
vendor/behat/mink-browserkit-driver/tests/web-fixtures/issue140.php
vendored
Normal file
20
vendor/behat/mink-browserkit-driver/tests/web-fixtures/issue140.php
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<html>
|
||||
<body>
|
||||
<?php if ($app['request']->isMethod('POST')) {
|
||||
$resp = new Symfony\Component\HttpFoundation\Response();
|
||||
$cook = new Symfony\Component\HttpFoundation\Cookie('tc', $app['request']->request->get('cookie_value'));
|
||||
$resp->headers->setCookie($cook);
|
||||
} elseif ($app['request']->query->has('show_value')) {
|
||||
echo $app['request']->cookies->get('tc');
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<form method="post">
|
||||
<input name="cookie_value">
|
||||
<input type="submit" value="Set cookie">
|
||||
</form>
|
||||
</body>
|
25
vendor/behat/mink-browserkit-driver/tests/web-fixtures/print_cookies.php
vendored
Normal file
25
vendor/behat/mink-browserkit-driver/tests/web-fixtures/print_cookies.php
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
|
||||
<head>
|
||||
<title>Cookies page</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
$cookies = $app['request']->cookies->all();
|
||||
unset($cookies['MOCKSESSID']);
|
||||
|
||||
if (isset($cookies['srvr_cookie'])) {
|
||||
$srvrCookie = $cookies['srvr_cookie'];
|
||||
unset($cookies['srvr_cookie']);
|
||||
$cookies['_SESS'] = '';
|
||||
$cookies['srvr_cookie'] = $srvrCookie;
|
||||
}
|
||||
|
||||
foreach ($cookies as $name => $val) {
|
||||
$cookies[$name] = (string)$val;
|
||||
}
|
||||
echo str_replace(array('>'), '', var_export($cookies, true));
|
||||
?>
|
||||
</body>
|
||||
</html>
|
3
vendor/behat/mink-browserkit-driver/tests/web-fixtures/redirector.php
vendored
Normal file
3
vendor/behat/mink-browserkit-driver/tests/web-fixtures/redirector.php
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
|
||||
$resp = new Symfony\Component\HttpFoundation\RedirectResponse('/redirect_destination.html');
|
15
vendor/behat/mink-browserkit-driver/tests/web-fixtures/response_headers.php
vendored
Normal file
15
vendor/behat/mink-browserkit-driver/tests/web-fixtures/response_headers.php
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
$resp = new Symfony\Component\HttpFoundation\Response();
|
||||
$resp->headers->set('X-Mink-Test', 'response-headers');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Response headers</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Response headers</h1>
|
||||
</body>
|
||||
</html>
|
||||
|
19
vendor/behat/mink-browserkit-driver/tests/web-fixtures/session_test.php
vendored
Normal file
19
vendor/behat/mink-browserkit-driver/tests/web-fixtures/session_test.php
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
$session = $app['request']->getSession();
|
||||
|
||||
if ($app['request']->query->has('login')) {
|
||||
$session->migrate();
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
|
||||
<head>
|
||||
<title>Session Test</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
|
||||
<script>
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="session-id"><?php echo $session->getId() ?></div>
|
||||
</body>
|
||||
</html>
|
18
vendor/behat/mink-browserkit-driver/tests/web-fixtures/sub-folder/cookie_page1.php
vendored
Normal file
18
vendor/behat/mink-browserkit-driver/tests/web-fixtures/sub-folder/cookie_page1.php
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
$requestUri = $app['request']->server->get('REQUEST_URI');
|
||||
$resp = new Symfony\Component\HttpFoundation\Response();
|
||||
$cook = new Symfony\Component\HttpFoundation\Cookie('srvr_cookie', 'srv_var_is_set_sub_folder', 0, dirname($requestUri));
|
||||
$resp->headers->setCookie($cook);
|
||||
?>
|
||||
<!doctype html public "-//w3c//dtd xhtml 1.1//en" "http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
|
||||
<head>
|
||||
<title>basic form</title>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
||||
<script>
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
basic page with cookie set from server side
|
||||
</body>
|
||||
</html>
|
18
vendor/behat/mink-browserkit-driver/tests/web-fixtures/sub-folder/cookie_page2.php
vendored
Normal file
18
vendor/behat/mink-browserkit-driver/tests/web-fixtures/sub-folder/cookie_page2.php
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
|
||||
<head>
|
||||
<title>Basic Form</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
|
||||
<script>
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
Previous cookie: <?php
|
||||
if ($app['request']->cookies->has('srvr_cookie')) {
|
||||
echo $app['request']->cookies->get('srvr_cookie');
|
||||
} else {
|
||||
echo 'NO';
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
Reference in a new issue