Update to Drupal 8.0.0 beta 14. For more information, see https://drupal.org/node/2544542
This commit is contained in:
parent
3b2511d96d
commit
81ccda77eb
2155 changed files with 54307 additions and 46870 deletions
|
@ -207,6 +207,21 @@ class ClientTest extends \PHPUnit_Framework_TestCase
|
|||
$client->request('GET', 'http://www.example.com/foo/foobar');
|
||||
$client->request('GET', 'bar');
|
||||
$this->assertEquals('http://www.example.com/foo/bar', $client->getRequest()->getUri(), '->request() uses the previous request for relative URLs');
|
||||
|
||||
$client = new TestClient();
|
||||
$client->request('GET', 'http://www.example.com/foo/');
|
||||
$client->request('GET', 'http');
|
||||
$this->assertEquals('http://www.example.com/foo/http', $client->getRequest()->getUri(), '->request() uses the previous request for relative URLs');
|
||||
|
||||
$client = new TestClient();
|
||||
$client->request('GET', 'http://www.example.com/foo');
|
||||
$client->request('GET', 'http/bar');
|
||||
$this->assertEquals('http://www.example.com/http/bar', $client->getRequest()->getUri(), '->request() uses the previous request for relative URLs');
|
||||
|
||||
$client = new TestClient();
|
||||
$client->request('GET', 'http://www.example.com/');
|
||||
$client->request('GET', 'http');
|
||||
$this->assertEquals('http://www.example.com/http', $client->getRequest()->getUri(), '->request() uses the previous request for relative URLs');
|
||||
}
|
||||
|
||||
public function testRequestURIConversionByServerHost()
|
||||
|
@ -332,7 +347,7 @@ class ClientTest extends \PHPUnit_Framework_TestCase
|
|||
$client->followRedirect();
|
||||
$this->fail('->followRedirect() throws a \LogicException if the request was not redirected');
|
||||
} catch (\Exception $e) {
|
||||
$this->assertInstanceof('LogicException', $e, '->followRedirect() throws a \LogicException if the request was not redirected');
|
||||
$this->assertInstanceOf('LogicException', $e, '->followRedirect() throws a \LogicException if the request was not redirected');
|
||||
}
|
||||
|
||||
$client->setNextResponse(new Response('', 302, array('Location' => 'http://www.example.com/redirected')));
|
||||
|
@ -362,7 +377,7 @@ class ClientTest extends \PHPUnit_Framework_TestCase
|
|||
$client->followRedirect();
|
||||
$this->fail('->followRedirect() throws a \LogicException if the request did not respond with 30x HTTP Code');
|
||||
} catch (\Exception $e) {
|
||||
$this->assertInstanceof('LogicException', $e, '->followRedirect() throws a \LogicException if the request did not respond with 30x HTTP Code');
|
||||
$this->assertInstanceOf('LogicException', $e, '->followRedirect() throws a \LogicException if the request did not respond with 30x HTTP Code');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -392,7 +407,7 @@ class ClientTest extends \PHPUnit_Framework_TestCase
|
|||
$client->followRedirect();
|
||||
$this->fail('->followRedirect() throws a \LogicException if the request was redirected and limit of redirections was reached');
|
||||
} catch (\Exception $e) {
|
||||
$this->assertInstanceof('LogicException', $e, '->followRedirect() throws a \LogicException if the request was redirected and limit of redirections was reached');
|
||||
$this->assertInstanceOf('LogicException', $e, '->followRedirect() throws a \LogicException if the request was redirected and limit of redirections was reached');
|
||||
}
|
||||
|
||||
$client->setNextResponse(new Response('', 302, array('Location' => 'http://www.example.com/redirected')));
|
||||
|
@ -562,7 +577,7 @@ class ClientTest extends \PHPUnit_Framework_TestCase
|
|||
$client->request('GET', 'http://www.example.com/foo/foobar');
|
||||
$this->fail('->request() throws a \RuntimeException if the script has an error');
|
||||
} catch (\Exception $e) {
|
||||
$this->assertInstanceof('RuntimeException', $e, '->request() throws a \RuntimeException if the script has an error');
|
||||
$this->assertInstanceOf('RuntimeException', $e, '->request() throws a \RuntimeException if the script has an error');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -74,30 +74,30 @@ class CookieTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
public function testFromStringWithUrl()
|
||||
{
|
||||
$this->assertEquals('foo=bar; domain=www.example.com; path=/', (string) Cookie::FromString('foo=bar', 'http://www.example.com/'));
|
||||
$this->assertEquals('foo=bar; domain=www.example.com; path=/', (string) Cookie::FromString('foo=bar', 'http://www.example.com'));
|
||||
$this->assertEquals('foo=bar; domain=www.example.com; path=/', (string) Cookie::FromString('foo=bar', 'http://www.example.com?foo'));
|
||||
$this->assertEquals('foo=bar; domain=www.example.com; path=/foo', (string) Cookie::FromString('foo=bar', 'http://www.example.com/foo/bar'));
|
||||
$this->assertEquals('foo=bar; domain=www.example.com; path=/', (string) Cookie::FromString('foo=bar; path=/', 'http://www.example.com/foo/bar'));
|
||||
$this->assertEquals('foo=bar; domain=www.myotherexample.com; path=/', (string) Cookie::FromString('foo=bar; domain=www.myotherexample.com', 'http://www.example.com/'));
|
||||
$this->assertEquals('foo=bar; domain=www.example.com; path=/', (string) Cookie::fromString('foo=bar', 'http://www.example.com/'));
|
||||
$this->assertEquals('foo=bar; domain=www.example.com; path=/', (string) Cookie::fromString('foo=bar', 'http://www.example.com'));
|
||||
$this->assertEquals('foo=bar; domain=www.example.com; path=/', (string) Cookie::fromString('foo=bar', 'http://www.example.com?foo'));
|
||||
$this->assertEquals('foo=bar; domain=www.example.com; path=/foo', (string) Cookie::fromString('foo=bar', 'http://www.example.com/foo/bar'));
|
||||
$this->assertEquals('foo=bar; domain=www.example.com; path=/', (string) Cookie::fromString('foo=bar; path=/', 'http://www.example.com/foo/bar'));
|
||||
$this->assertEquals('foo=bar; domain=www.myotherexample.com; path=/', (string) Cookie::fromString('foo=bar; domain=www.myotherexample.com', 'http://www.example.com/'));
|
||||
}
|
||||
|
||||
public function testFromStringThrowsAnExceptionIfCookieIsNotValid()
|
||||
{
|
||||
$this->setExpectedException('InvalidArgumentException');
|
||||
Cookie::FromString('foo');
|
||||
Cookie::fromString('foo');
|
||||
}
|
||||
|
||||
public function testFromStringThrowsAnExceptionIfCookieDateIsNotValid()
|
||||
{
|
||||
$this->setExpectedException('InvalidArgumentException');
|
||||
Cookie::FromString('foo=bar; expires=Flursday July 31st 2020, 08:49:37 GMT');
|
||||
Cookie::fromString('foo=bar; expires=Flursday July 31st 2020, 08:49:37 GMT');
|
||||
}
|
||||
|
||||
public function testFromStringThrowsAnExceptionIfUrlIsNotValid()
|
||||
{
|
||||
$this->setExpectedException('InvalidArgumentException');
|
||||
Cookie::FromString('foo=bar', 'foobar');
|
||||
Cookie::fromString('foo=bar', 'foobar');
|
||||
}
|
||||
|
||||
public function testGetName()
|
||||
|
|
|
@ -54,7 +54,7 @@ class HistoryTest extends \PHPUnit_Framework_TestCase
|
|||
$history->current();
|
||||
$this->fail('->current() throws a \LogicException if the history is empty');
|
||||
} catch (\Exception $e) {
|
||||
$this->assertInstanceof('LogicException', $e, '->current() throws a \LogicException if the history is empty');
|
||||
$this->assertInstanceOf('LogicException', $e, '->current() throws a \LogicException if the history is empty');
|
||||
}
|
||||
|
||||
$history->add(new Request('http://www.example.com/', 'get'));
|
||||
|
@ -71,7 +71,7 @@ class HistoryTest extends \PHPUnit_Framework_TestCase
|
|||
$history->back();
|
||||
$this->fail('->back() throws a \LogicException if the history is already on the first page');
|
||||
} catch (\Exception $e) {
|
||||
$this->assertInstanceof('LogicException', $e, '->current() throws a \LogicException if the history is already on the first page');
|
||||
$this->assertInstanceOf('LogicException', $e, '->current() throws a \LogicException if the history is already on the first page');
|
||||
}
|
||||
|
||||
$history->add(new Request('http://www.example1.com/', 'get'));
|
||||
|
@ -90,7 +90,7 @@ class HistoryTest extends \PHPUnit_Framework_TestCase
|
|||
$history->forward();
|
||||
$this->fail('->forward() throws a \LogicException if the history is already on the last page');
|
||||
} catch (\Exception $e) {
|
||||
$this->assertInstanceof('LogicException', $e, '->forward() throws a \LogicException if the history is already on the last page');
|
||||
$this->assertInstanceOf('LogicException', $e, '->forward() throws a \LogicException if the history is already on the last page');
|
||||
}
|
||||
|
||||
$history->back();
|
||||
|
|
Reference in a new issue