mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-31 04:27:00 +00:00
Fix tests
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
--TEMPLATE--
|
||||
{% cache 'test_%s_%s'|format(10, 10000) ttl(36000) %}
|
||||
{% set content %}
|
||||
OK
|
||||
ok
|
||||
{% endset %}
|
||||
{% apply spaceless %}
|
||||
{% apply upper %}
|
||||
{{ content }}
|
||||
{% endapply %}
|
||||
{% endcache %}
|
||||
|
||||
@@ -1,40 +1,29 @@
|
||||
--TEST--
|
||||
"inline_css" filter
|
||||
--TEMPLATE--
|
||||
{% apply inline_css|spaceless %}
|
||||
<html>
|
||||
<style>p { color: red }</style>
|
||||
<p>Great!</p>
|
||||
</html>
|
||||
{% apply inline_css %}
|
||||
<html><style>p { color: red }</style><p>Great!</p></html>
|
||||
{% endapply %}
|
||||
|
||||
|
||||
{% apply inline_css(source('css'))|spaceless %}
|
||||
<html>
|
||||
<p>Great!</p>
|
||||
</html>
|
||||
{% apply inline_css(source('css')) %}
|
||||
<html><p>Great!</p></html>
|
||||
{% endapply %}
|
||||
|
||||
|
||||
{% apply inline_css(source('css'), source('more_css'))|spaceless %}
|
||||
<html>
|
||||
<p>Great!</p>
|
||||
</html>
|
||||
{% apply inline_css(source('css'), source('more_css')) %}
|
||||
<html><p>Great!</p></html>
|
||||
{% endapply %}
|
||||
|
||||
|
||||
{% apply inline_css(source('css') ~ source('more_css'))|spaceless %}
|
||||
<html>
|
||||
<p>Great!</p>
|
||||
</html>
|
||||
{% apply inline_css(source('css') ~ source('more_css')) %}
|
||||
<html><p>Great!</p></html>
|
||||
{% endapply %}
|
||||
|
||||
|
||||
{{ include('html')|inline_css(source('css') ~ source('more_css'))|spaceless }}
|
||||
{{ include('html')|inline_css(source('css') ~ source('more_css')) }}
|
||||
--TEMPLATE(html)--
|
||||
<html>
|
||||
<p>Great!</p>
|
||||
</html>
|
||||
<html><p>Great!</p></html>
|
||||
--TEMPLATE(css)--
|
||||
p { color: red }
|
||||
--TEMPLATE(more_css)--
|
||||
@@ -42,12 +31,20 @@ p { color: blue }
|
||||
--DATA--
|
||||
return []
|
||||
--EXPECT--
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"><html><head><style>p { color: red }</style></head><body><p style="color: red;">Great!</p></body></html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head><style>p { color: red }</style></head>
|
||||
<body><p style="color: red;">Great!</p></body>
|
||||
</html>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"><html><body><p style="color: red;">Great!</p></body></html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html><body><p style="color: red;">Great!</p></body></html>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"><html><body><p style="color: blue;">Great!</p></body></html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html><body><p style="color: blue;">Great!</p></body></html>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"><html><body><p style="color: blue;">Great!</p></body></html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html><body><p style="color: blue;">Great!</p></body></html>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"><html><body><p style="color: blue;">Great!</p></body></html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html><body><p style="color: blue;">Great!</p></body></html>
|
||||
|
||||
Reference in New Issue
Block a user