commit a26e46c0a5d2dcbc67fb6d77637fa88781b52034 Author: Stefan Topfstedt Date: Fri Apr 12 17:11:30 2013 -0400 1898458-new_changes diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php index 20ccc2b..73a4eb6 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php @@ -174,7 +174,7 @@ function testThemeGetSetting() { * Ensures the theme registry is rebuilt when modules are disabled/enabled. */ function testRegistryRebuild() { - $this->assertIdentical(theme('theme_test_foo', array('foo' => 'a')), 'a', 'The theme registry contains theme_test_foo.'); + $this->assertIdentical(trim(theme('theme_test_foo', array('foo' => 'a'))), 'a', 'The theme registry contains theme_test_foo.'); module_disable(array('theme_test'), FALSE); // After enabling/disabling a module during a test, we need to rebuild the @@ -190,7 +190,7 @@ function testRegistryRebuild() { // throws an exception. $this->rebuildContainer(); $this->container->get('module_handler')->loadAll(); - $this->assertIdentical(theme('theme_test_foo', array('foo' => 'c')), 'c', 'The theme registry contains theme_test_foo again after re-enabling the module.'); + $this->assertIdentical(trim(theme('theme_test_foo', array('foo' => 'c'))), 'c', 'The theme registry contains theme_test_foo again after re-enabling the module.'); } /** diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/TwigSettingsTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/TwigSettingsTest.php index f52f70f..4e460ff 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Theme/TwigSettingsTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Theme/TwigSettingsTest.php @@ -76,7 +76,7 @@ function testTwigDebugOverride() { * Ensures Twig template cache setting can be overridden. */ function testTwigCacheOverride() { - $extension = '.html.twig'; + $extension = twig_extension(); theme_enable(array('test_theme_twig')); config('system.theme') ->set('default', 'test_theme_twig') diff --git a/core/modules/system/tests/modules/theme_test/templates/theme-test-foo.html.twig b/core/modules/system/tests/modules/theme_test/templates/theme-test-foo.html.twig index a804af3..6691ce5 100644 --- a/core/modules/system/tests/modules/theme_test/templates/theme-test-foo.html.twig +++ b/core/modules/system/tests/modules/theme_test/templates/theme-test-foo.html.twig @@ -1,14 +1,14 @@ {# /** * @file - * Default theme implementation for the 'theme_test' theme hook used by tests. + * Default theme implementation for the 'theme_test' theme hook. * * Available variables: - * - foo: dummy text + * - foo: Dummy text to display. * * @see template_preprocess() * * @ingroup themeable */ #} -{{ foo }} \ No newline at end of file +{{ foo }} diff --git a/core/modules/system/tests/modules/theme_test/templates/theme-test.html.twig b/core/modules/system/tests/modules/theme_test/templates/theme-test.html.twig index b388c08..08f5226 100644 --- a/core/modules/system/tests/modules/theme_test/templates/theme-test.html.twig +++ b/core/modules/system/tests/modules/theme_test/templates/theme-test.html.twig @@ -1,10 +1,10 @@ {# /** * @file - * Default theme implementation for the 'theme_test_foo' theme hook used by tests. + * Default theme implementation for the 'theme_test_foo' theme hook. * * Available variables: - * - foo: dummy text + * - foo: Dummy text to display. * * @see template_preprocess() * @see template_preprocess_theme_test() @@ -12,4 +12,4 @@ * @ingroup themeable */ #} -Theme hook implementor=theme_theme_test(). Foo={{ foo }} \ No newline at end of file +Theme hook implementor=theme_theme_test(). Foo={{ foo }} diff --git a/core/modules/system/tests/modules/theme_test/theme_test.inc b/core/modules/system/tests/modules/theme_test/theme_test.inc index 038f462..99043fe 100644 --- a/core/modules/system/tests/modules/theme_test/theme_test.inc +++ b/core/modules/system/tests/modules/theme_test/theme_test.inc @@ -1,13 +1,13 @@ 'theme_test.inc', 'variables' => array('foo' => ''), - 'template' => 'theme-test' + 'template' => 'theme-test', ); $items['theme_test_template_test'] = array( 'template' => 'theme_test.template_test', @@ -17,7 +17,7 @@ function theme_test_theme($existing, $type, $theme, $path) { ); $items['theme_test_foo'] = array( 'variables' => array('foo' => NULL), - 'template' => 'theme-test-foo' + 'template' => 'theme-test-foo', ); return $items; }