MINOR: Fixed 2.4 mergeback

This commit is contained in:
Sam Minnee 2011-02-22 10:53:58 +13:00
parent 1e0c4ae8d1
commit 27246ce982
6 changed files with 26 additions and 38 deletions

View File

@ -346,5 +346,24 @@ class Convert {
$data $data
); );
} }
/**
* 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;
}
} }

View File

@ -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,8 +173,7 @@ 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".
*/ */

View File

@ -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.

View File

@ -15,7 +15,9 @@ class Security extends Controller {
'passwordsent', 'passwordsent',
'changepassword', 'changepassword',
'ping', 'ping',
'LoginForm' 'LoginForm',
'ChangePasswordForm',
'LostPasswordForm',
); );
/** /**

View File

@ -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>

View File

@ -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');