Kohana v3.3.5
This commit is contained in:
@@ -16,6 +16,18 @@
|
||||
*/
|
||||
class Kohana_HTMLTest extends Unittest_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Sets up the environment
|
||||
*/
|
||||
// @codingStandardsIgnoreStart
|
||||
public function setUp()
|
||||
// @codingStandardsIgnoreEnd
|
||||
{
|
||||
parent::setUp();
|
||||
Kohana::$config->load('url')->set('trusted_hosts', array('www\.kohanaframework\.org'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Defaults for this test
|
||||
* @var array
|
||||
@@ -117,6 +129,10 @@ class Kohana_HTMLTest extends Unittest_TestCase
|
||||
'https',
|
||||
FALSE
|
||||
),
|
||||
array(
|
||||
'<script type="text/javascript" src="//google.com/script.js"></script>',
|
||||
'//google.com/script.js',
|
||||
),
|
||||
|
||||
);
|
||||
}
|
||||
@@ -193,6 +209,13 @@ class Kohana_HTMLTest extends Unittest_TestCase
|
||||
'https',
|
||||
TRUE
|
||||
),
|
||||
array(
|
||||
'<link type="text/css" href="//google.com/style.css" rel="stylesheet" />',
|
||||
'//google.com/style.css',
|
||||
array(),
|
||||
NULL,
|
||||
FALSE
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -223,6 +246,20 @@ class Kohana_HTMLTest extends Unittest_TestCase
|
||||
public function provider_anchor()
|
||||
{
|
||||
return array(
|
||||
// a fragment-only anchor
|
||||
array(
|
||||
'<a href="#go-to-section-kohana">Kohana</a>',
|
||||
array(),
|
||||
'#go-to-section-kohana',
|
||||
'Kohana',
|
||||
),
|
||||
// a query-only anchor
|
||||
array(
|
||||
'<a href="?cat=a">Category A</a>',
|
||||
array(),
|
||||
'?cat=a',
|
||||
'Category A',
|
||||
),
|
||||
array(
|
||||
'<a href="http://kohanaframework.org">Kohana</a>',
|
||||
array(),
|
||||
|
Reference in New Issue
Block a user