-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
better filter method behavior, handling mismatching endblocks, improv…
…ed makefile with automatic testing
- Loading branch information
Showing
28 changed files
with
285 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--TEST-- | ||
|
||
Make sure blockbase works on a base template that has no blocks | ||
|
||
--FILE-- | ||
|
||
<? require_once 'ti.php' ?> | ||
<? include 'templates/base_no_blocks.php' ?> | ||
|
||
<? startblock('content') ?> | ||
this is the content | ||
<? endblock() ?> | ||
|
||
--EXPECT-- | ||
|
||
<html> | ||
<head> | ||
<link rel='stylesheet' type='text/css' href='main.css' /> | ||
<script type='text/javascript' src='main.js'></script> | ||
</head> | ||
<body> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--TEST-- | ||
|
||
Enblock with the optional name parameter | ||
|
||
--FILE-- | ||
|
||
<? require_once 'ti.php' ?> | ||
<? include 'templates/base.php' ?> | ||
|
||
<? startblock('content') ?> | ||
<p> | ||
the page content | ||
</p> | ||
<? endblock('content') ?> | ||
|
||
<? startblock('title') ?> | ||
the page title | ||
<? endblock('title') ?> | ||
|
||
--EXPECT-- | ||
|
||
<html> | ||
<head> | ||
<link rel='stylesheet' type='text/css' href='main.css' /> | ||
<script type='text/javascript' src='main.js'></script> | ||
</head> | ||
<body> | ||
<div id='header'> | ||
<h1> | ||
the page title | ||
</h1> | ||
</div> | ||
<div id='content'> | ||
<p> | ||
the page content | ||
</p> | ||
</div> | ||
<div id='footer'> | ||
this is the default footer | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--TEST-- | ||
|
||
Enblock with the optional name parameter | ||
|
||
--FILE-- | ||
|
||
<? require_once 'ti.php' ?> | ||
<? include 'templates/base.php' ?> | ||
|
||
<? startblock('content') ?> | ||
<p> | ||
the page content | ||
</p> | ||
<? endblock('xxx') ?> | ||
|
||
<? startblock('title') ?> | ||
the page title | ||
<? endblock('title') ?> | ||
|
||
--EXPECTF-- | ||
|
||
<html> | ||
<head> | ||
<link rel='stylesheet' type='text/css' href='main.css' /> | ||
<script type='text/javascript' src='main.js'></script> | ||
</head> | ||
<body> | ||
<div id='header'> | ||
<h1> | ||
the page title | ||
</h1> | ||
</div> | ||
<div id='content'> | ||
<p> | ||
the page content | ||
</p> | ||
</div> | ||
<div id='footer'> | ||
this is the default footer | ||
</div> | ||
</body> | ||
</html> | ||
|
||
Warning: startblock('content') does not match endblock('xxx') in %s/endblock_mismatch.php on line 9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--TEST-- | ||
|
||
Filters work with the array('class','method') | ||
|
||
--FILE-- | ||
|
||
<? | ||
|
||
require_once 'ti.php'; | ||
include 'templates/base.php'; | ||
|
||
class MyFilters { | ||
function filter1($s) { | ||
return '*' . trim($s) . '*'; | ||
} | ||
} | ||
|
||
?> | ||
|
||
<? startblock('content', array(array('MyFilters','filter1'), array('Nothing','method'))) ?> | ||
this is the content | ||
<? endblock() ?> | ||
|
||
--EXPECTF-- | ||
|
||
<html> | ||
<head> | ||
<link rel='stylesheet' type='text/css' href='main.css' /> | ||
<script type='text/javascript' src='main.js'></script> | ||
</head> | ||
<body> | ||
<div id='header'> | ||
<h1> | ||
</h1> | ||
</div> | ||
<div id='content'> | ||
*this is the content*</div> | ||
<div id='footer'> | ||
this is the default footer | ||
</div> | ||
</body> | ||
</html> | ||
|
||
Warning: filter Nothing::method is not defined in /home/adam/Projects/PHPTI/tests/filters_class.php on line 15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.