mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: Fixed 2.4 mergeback
This commit is contained in:
parent
1e0c4ae8d1
commit
27246ce982
@ -347,4 +347,23 @@ class Convert {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert a string (normally a title) to a string suitable for using in
|
||||||
|
* urls and other html attributes
|
||||||
|
*
|
||||||
|
* @param string
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function raw2url($title) {
|
||||||
|
$t = (function_exists('mb_strtolower')) ? mb_strtolower($title) : strtolower($title);
|
||||||
|
$t = Object::create('Transliterator')->toASCII($t);
|
||||||
|
$t = str_replace('&','-and-',$t);
|
||||||
|
$t = str_replace('&','-and-',$t);
|
||||||
|
$t = ereg_replace('[^A-Za-z0-9]+','-',$t);
|
||||||
|
$t = ereg_replace('-+','-',$t);
|
||||||
|
$t = trim($t, '-');
|
||||||
|
|
||||||
|
return $t;
|
||||||
|
}
|
||||||
}
|
}
|
@ -55,21 +55,6 @@ class TestRunner extends Controller {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var Array Blacklist certain directories for the coverage report.
|
|
||||||
* Filepaths are relative to the webroot, without leading slash.
|
|
||||||
*
|
|
||||||
* @see http://www.phpunit.de/manual/current/en/appendixes.configuration.html#appendixes.configuration.blacklist-whitelist
|
|
||||||
*/
|
|
||||||
static $coverage_filter_dirs = array(
|
|
||||||
'cms/thirdparty',
|
|
||||||
'cms/tests',
|
|
||||||
'cms/lang',
|
|
||||||
'sapphire/thirdparty',
|
|
||||||
'sapphire/tests',
|
|
||||||
'sapphire/lang',
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Array Blacklist certain directories for the coverage report.
|
* @var Array Blacklist certain directories for the coverage report.
|
||||||
* Filepaths are relative to the webroot, without leading slash.
|
* Filepaths are relative to the webroot, without leading slash.
|
||||||
@ -188,7 +173,6 @@ class TestRunner extends Controller {
|
|||||||
ManifestBuilder::load_all_classes();
|
ManifestBuilder::load_all_classes();
|
||||||
$this->all($request, true);
|
$this->all($request, true);
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run only a single coverage test class or a comma-separated list of tests
|
* Run only a single coverage test class or a comma-separated list of tests
|
||||||
@ -198,17 +182,6 @@ class TestRunner extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
=======
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Run only a single coverage test class or a comma-separated list of tests
|
|
||||||
*/
|
|
||||||
function coverageOnly($request) {
|
|
||||||
$this->only($request, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
>>>>>>> 2.4
|
|
||||||
* Run coverage tests for one or more "modules".
|
* Run coverage tests for one or more "modules".
|
||||||
* A module is generally a toplevel folder, e.g. "mysite" or "sapphire".
|
* A module is generally a toplevel folder, e.g. "mysite" or "sapphire".
|
||||||
*/
|
*/
|
||||||
|
@ -25,8 +25,6 @@ class Folder extends File {
|
|||||||
|
|
||||||
static $default_sort = "\"Sort\"";
|
static $default_sort = "\"Sort\"";
|
||||||
|
|
||||||
static $default_sort = "\"Sort\"";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the given folder or create it both as {@link Folder} database records
|
* Find the given folder or create it both as {@link Folder} database records
|
||||||
* and on the filesystem. If necessary, creates parent folders as well.
|
* and on the filesystem. If necessary, creates parent folders as well.
|
||||||
|
@ -15,7 +15,9 @@ class Security extends Controller {
|
|||||||
'passwordsent',
|
'passwordsent',
|
||||||
'changepassword',
|
'changepassword',
|
||||||
'ping',
|
'ping',
|
||||||
'LoginForm'
|
'LoginForm',
|
||||||
|
'ChangePasswordForm',
|
||||||
|
'LostPasswordForm',
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -279,8 +279,8 @@ after')
|
|||||||
<html>
|
<html>
|
||||||
<head><% base_tag %></head>
|
<head><% base_tag %></head>
|
||||||
<body><p>test</p><body>
|
<body><p>test</p><body>
|
||||||
</html>');
|
</html>';
|
||||||
$this->assertRegExp('/<head><base href=".*" \/><\/head>/', $tmpl1->process(new ViewableData()));
|
$this->assertRegExp('/<head><base href=".*" \/><\/head>/', $this->render($tmpl1));
|
||||||
|
|
||||||
// HTML4 and 5 will only have it for IE
|
// HTML4 and 5 will only have it for IE
|
||||||
$tmpl2 = '<!DOCTYPE html>
|
$tmpl2 = '<!DOCTYPE html>
|
||||||
|
@ -11,10 +11,6 @@ class CheckboxFieldTest extends SapphireTest {
|
|||||||
'CheckboxFieldTest_Article',
|
'CheckboxFieldTest_Article',
|
||||||
);
|
);
|
||||||
|
|
||||||
protected $extraDataObjects = array(
|
|
||||||
'CheckboxFieldTest_Article',
|
|
||||||
);
|
|
||||||
|
|
||||||
function testFieldValueTrue() {
|
function testFieldValueTrue() {
|
||||||
/* Create the field, and set the value as boolean true */
|
/* Create the field, and set the value as boolean true */
|
||||||
$field = new CheckboxField('IsChecked', 'Checked');
|
$field = new CheckboxField('IsChecked', 'Checked');
|
||||||
|
Loading…
Reference in New Issue
Block a user