diff --git a/core/Convert.php b/core/Convert.php index 564ef0151..6ee68bed1 100755 --- a/core/Convert.php +++ b/core/Convert.php @@ -346,5 +346,24 @@ class Convert { $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; + } } \ No newline at end of file diff --git a/dev/TestRunner.php b/dev/TestRunner.php index fbe860e4d..92b831bfc 100644 --- a/dev/TestRunner.php +++ b/dev/TestRunner.php @@ -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. * Filepaths are relative to the webroot, without leading slash. @@ -188,8 +173,7 @@ class TestRunner extends Controller { ManifestBuilder::load_all_classes(); $this->all($request, true); } -<<<<<<< HEAD - + /** * 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". * A module is generally a toplevel folder, e.g. "mysite" or "sapphire". */ diff --git a/filesystem/Folder.php b/filesystem/Folder.php index e92175c4d..2a6c43d67 100755 --- a/filesystem/Folder.php +++ b/filesystem/Folder.php @@ -25,8 +25,6 @@ class Folder extends File { static $default_sort = "\"Sort\""; - static $default_sort = "\"Sort\""; - /** * Find the given folder or create it both as {@link Folder} database records * and on the filesystem. If necessary, creates parent folders as well. diff --git a/security/Security.php b/security/Security.php index ab8ee216e..7f8e65d8a 100644 --- a/security/Security.php +++ b/security/Security.php @@ -15,7 +15,9 @@ class Security extends Controller { 'passwordsent', 'changepassword', 'ping', - 'LoginForm' + 'LoginForm', + 'ChangePasswordForm', + 'LostPasswordForm', ); /** diff --git a/tests/SSViewerTest.php b/tests/SSViewerTest.php index 245856532..1066e41b0 100644 --- a/tests/SSViewerTest.php +++ b/tests/SSViewerTest.php @@ -279,8 +279,8 @@ after') <% base_tag %>

test

- '); - $this->assertRegExp('/<\/head>/', $tmpl1->process(new ViewableData())); + '; + $this->assertRegExp('/<\/head>/', $this->render($tmpl1)); // HTML4 and 5 will only have it for IE $tmpl2 = ' diff --git a/tests/forms/CheckboxFieldTest.php b/tests/forms/CheckboxFieldTest.php index bfb2bff0a..fa455c69e 100644 --- a/tests/forms/CheckboxFieldTest.php +++ b/tests/forms/CheckboxFieldTest.php @@ -11,10 +11,6 @@ class CheckboxFieldTest extends SapphireTest { 'CheckboxFieldTest_Article', ); - protected $extraDataObjects = array( - 'CheckboxFieldTest_Article', - ); - function testFieldValueTrue() { /* Create the field, and set the value as boolean true */ $field = new CheckboxField('IsChecked', 'Checked');