class LinkValidateSpecificURL in Link 6.2
Hierarchy
- class \LinkValidateTestCase extends \ContentCrudTestCase
- class \LinkValidateSpecificURL
Expanded class hierarchy of LinkValidateSpecificURL
File
- tests/
link.validate.test, line 319 - Tests that exercise the validation functions in the link module.
View source
class LinkValidateSpecificURL extends LinkValidateTestCase {
function getInfo() {
return array(
'name' => t('Link Specific URL Validation Tests'),
'description' => t('Tests field validation with unusual urls'),
'group' => t('Link'),
);
}
// Lets throw in a lot of umlouts for testing!
function test_umlout_url() {
$this
->link_test_validate_url('http://üÜü.exämple.com/nöde');
}
function test_umlout_mailto() {
$this
->link_test_validate_url('mailto:Üser@exÅmple.com');
}
function test_german_b_url() {
$this
->link_test_validate_url('http://www.test.com/ßstuff');
}
function test_special_n_url() {
$this
->link_test_validate_url('http://www.testÑñ.com/');
}
function test_curly_brackets_in_query() {
$this
->link_test_validate_url('http://www.healthyteennetwork.org/index.asp?Type=B_PR&SEC={2AE1D600-4FC6-4B4D-8822-F1D5F072ED7B}&DE={235FD1E7-208D-4363-9854-4E6775EB8A4C}');
}
/**
* Here, we're testing that a very long url is stored properly in the db.
*
* Basicly, trying to test http://drupal.org/node/376818
*/
function testLinkURLFieldIsBig() {
$long_url = 'http://th.wikipedia.org/wiki/%E0%B9%82%E0%B8%A3%E0%B8%87%E0%B9%80%E0%B8%A3%E0%B8%B5%E0%B8%A2%E0%B8%99%E0%B9%80%E0%B8%9A%E0%B8%8D%E0%B8%88%E0%B8%A1%E0%B8%A3%E0%B8%B2%E0%B8%8A%E0%B8%B9%E0%B8%97%E0%B8%B4%E0%B8%A8_%E0%B8%99%E0%B8%84%E0%B8%A3%E0%B8%A8%E0%B8%A3%E0%B8%B5%E0%B8%98%E0%B8%A3%E0%B8%A3%E0%B8%A1%E0%B8%A3%E0%B8%B2%E0%B8%8A';
$this
->link_test_validate_url($long_url);
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LinkValidateSpecificURL:: |
function | |||
LinkValidateSpecificURL:: |
function | Here, we're testing that a very long url is stored properly in the db. | ||
LinkValidateSpecificURL:: |
function | |||
LinkValidateSpecificURL:: |
function | |||
LinkValidateSpecificURL:: |
function | |||
LinkValidateSpecificURL:: |
function | |||
LinkValidateSpecificURL:: |
function | |||
LinkValidateTestCase:: |
public | property | ||
LinkValidateTestCase:: |
function | |||
LinkValidateTestCase:: |
function | Takes a url, and sees if it can validate that the url is valid. | ||
LinkValidateTestCase:: |
function |