Differences Between: [Versions 39 and 310]
Unit tests for lib/classes/output/mustache_template_source_loader.php
Copyright: | 2018 Ryan Wyllie <ryan@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 526 lines (18 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
core_output_mustache_template_source_loader_testcase:: (8 methods):
test_strip_template_comments()
test_load_test_cases()
test_load()
test_load_with_dependencies_test_cases()
test_load_with_dependencies()
test_scan_template_source_for_dependencies_test_cases()
test_scan_template_source_for_dependencies()
build_loader_from_static_cache()
Class: core_output_mustache_template_source_loader_testcase - X-Ref
Unit tests for the Mustache source loader class.test_strip_template_comments() X-Ref |
Ensure that stripping comments from templates does not mutilate the template body. |
test_load_test_cases() X-Ref |
Data provider for the test_load function. |
test_load($loader, $component, $name, $includecomments, $expected) X-Ref |
Test the load function. param: mustache_template_source_loader $loader The loader param: string $component The moodle component param: string $name The template name param: bool $includecomments Whether to strip comments param: string $expected The expected output |
test_load_with_dependencies_test_cases() X-Ref |
Data provider for the load_with_dependencies function. |
test_load_with_dependencies($loader, $component, $name, $includecomments, $expected) X-Ref |
Test the load_with_dependencies function. param: mustache_template_source_loader $loader The loader param: string $component The moodle component param: string $name The template name param: bool $includecomments Whether to strip comments param: string $expected The expected output |
test_scan_template_source_for_dependencies_test_cases() X-Ref |
Data provider for the test_load function. |
test_scan_template_source_for_dependencies($loader, $source, $expected) X-Ref |
Test the scan_template_source_for_dependencies function. param: mustache_template_source_loader $loader The loader param: string $source The template to test param: string $expected The expected output |
build_loader_from_static_cache(array $cache) X-Ref |
Create an instance of mustache_template_source_loader which loads its templates from the given cache rather than disk. param: array $cache A cache of templates return: mustache_template_source_loader |