Skip to content
Browse files

Move Block and Variable parsers to Themer/Theme

  • Loading branch information...
1 parent 7917ee1 commit cbb3991c371aa9c17c10b06ba2629f4304a2751d @bschaeffer bschaeffer committed Feb 11, 2012
View
6 lib/Themer/Parser/BlockParser.php
@@ -8,10 +8,10 @@
namespace Themer\Parser;
use Closure;
-use Themer\Block;
-use Themer\Theme;
-use Themer\Variable;
use Themer\Parser\TemplateParser;
+use Themer\Theme;
+use Themer\Theme\Block;
+use Themer\Theme\Variable;
/**
* Parses block tags relevant to a specific theme.
View
4 lib/Themer/Theme.php
@@ -7,11 +7,11 @@
*/
namespace Themer;
-use Themer\Block;
use Themer\Data;
use Themer\Parser\BaseParser;
use Themer\Parser\BlockParser;
-use Themer\Variable;
+use Themer\Theme\Block;
+use Themer\Theme\Variable;
/**
* An base theme class for handling Tumblr template files.
View
4 lib/Themer/Block.php → lib/Themer/Theme/Block.php
@@ -5,7 +5,7 @@
* @link http://github.com/tmbly/themer
* @license http://www.opensource.org/licenses/mit-license.html MIT
*/
-namespace Themer;
+namespace Themer\Theme;
/**
* Themer block parser. Renders Tumblr block tags.
@@ -154,4 +154,4 @@ static public function formatIfBlockTag($tag = '')
}
}
/* End of file Block.php */
-/* Location: ./Themer/Block.php */
+/* Location: ./Themer/Theme/Block.php */
View
4 lib/Themer/Variable.php → lib/Themer/Theme/Variable.php
@@ -5,7 +5,7 @@
* @link http://github.com/tmbly/themer
* @license http://www.opensource.org/licenses/mit-license.html MIT
*/
-namespace Themer;
+namespace Themer\Theme;
/**
* Themer variable parser.Renders Tumblr tag variables
@@ -148,4 +148,4 @@ public static function renderURLEncoded($block, $search, $replace = '')
}
}
/* End of file Variable.php */
-/* Location: ./Themer/Variable.php */
+/* Location: ./Themer/Theme/Variable.php */
View
44 test/Themer/BlockTest.php → test/Themer/Theme/BlockTest.php
@@ -5,14 +5,14 @@
* @link http://github.com/tmbly/themer
* @license http://www.opensource.org/licenses/mit-license.html MIT
*/
-namespace Themer;
+namespace Themer\Theme;
class BlockTest extends \PHPUnit_Framework_TestCase {
/**
* @test
- * @covers Themer\Block::render
- * @covers Themer\Block::getMatcher
+ * @covers Themer\Theme\Block::render
+ * @covers Themer\Theme\Block::getMatcher
*/
public function renders_specified_blocks()
{
@@ -26,8 +26,8 @@ public function renders_specified_blocks()
/**
* @test
- * @covers Themer\Block::render
- * @covers Themer\Block::getMatcher
+ * @covers Themer\Theme\Block::render
+ * @covers Themer\Theme\Block::getMatcher
*/
public function does_not_render_unspecified_blocks()
{
@@ -41,10 +41,10 @@ public function does_not_render_unspecified_blocks()
/**
* @test
- * @covers Themer\Block::renderIf
- * @covers Themer\Block::formatIfBlockTag
- * @covers Themer\Block::remove
- * @covers Themer\Block::render
+ * @covers Themer\Theme\Block::renderIf
+ * @covers Themer\Theme\Block::formatIfBlockTag
+ * @covers Themer\Theme\Block::remove
+ * @covers Themer\Theme\Block::render
*/
public function renders_if_blocks()
{
@@ -59,10 +59,10 @@ public function renders_if_blocks()
/**
* @test
- * @covers Themer\Block::renderIf
- * @covers Themer\Block::formatIfBlockTag
- * @covers Themer\Block::remove
- * @covers Themer\Block::render
+ * @covers Themer\Theme\Block::renderIf
+ * @covers Themer\Theme\Block::formatIfBlockTag
+ * @covers Themer\Theme\Block::remove
+ * @covers Themer\Theme\Block::render
*/
public function renders_if_not_blocks()
{
@@ -77,7 +77,7 @@ public function renders_if_not_blocks()
/**
* @test
- * @covers Themer\Block::cleanup
+ * @covers Themer\Theme\Block::cleanup
*/
public function cleans_up_valid_blocks()
{
@@ -91,8 +91,8 @@ public function cleans_up_valid_blocks()
/**
* @test
- * @covers Themer\Block::remove
- * @covers Themer\Block::find
+ * @covers Themer\Theme\Block::remove
+ * @covers Themer\Theme\Block::find
*/
public function removes_specified_blocks()
{
@@ -107,8 +107,8 @@ public function removes_specified_blocks()
/**
* @test
- * @covers Themer\Block::find
- * @covers Themer\Block::getMatcher
+ * @covers Themer\Theme\Block::find
+ * @covers Themer\Theme\Block::getMatcher
*/
public function finds_specified_blocks()
{
@@ -130,8 +130,8 @@ public function finds_specified_blocks()
/**
* @test
- * @covers Themer\Block::find
- * @covers Themer\Block::getMatcher
+ * @covers Themer\Theme\Block::find
+ * @covers Themer\Theme\Block::getMatcher
*/
public function find_with_no_results_returns_an_array()
{
@@ -143,7 +143,7 @@ public function find_with_no_results_returns_an_array()
/**
* @test
- * @covers Themer\Block::formatIfBlockTag
+ * @covers Themer\Theme\Block::formatIfBlockTag
*/
public function formats_if_block_tags_correctly()
{
@@ -157,4 +157,4 @@ public function formats_if_block_tags_correctly()
}
}
/* End of file BlockTest.php */
-/* Location: ./test/Themer/BlockTest.php */
+/* Location: ./test/Themer/Theme/BlockTest.php */
View
32 test/Themer/VariableTest.php → test/Themer/Theme/VariableTest.php
@@ -5,13 +5,13 @@
* @link http://github.com/tmbly/themer
* @license http://www.opensource.org/licenses/mit-license.html MIT
*/
-namespace Themer;
+namespace Themer\Theme;
class VariableTest extends \PHPUnit_Framework_TestCase {
/**
* @test
- * @covers Themer\Variable::renderSimple
+ * @covers Themer\Theme\Variable::renderSimple
*/
public function renders_variables_correctly()
{
@@ -26,7 +26,7 @@ public function renders_variables_correctly()
/**
* @test
- * @covers Themer\Variable::renderPlaintext
+ * @covers Themer\Theme\Variable::renderPlaintext
*/
public function renders_Plaintext_tags_correctly()
{
@@ -43,7 +43,7 @@ public function renders_Plaintext_tags_correctly()
/**
* @test
- * @covers Themer\Variable::renderJS
+ * @covers Themer\Theme\Variable::renderJS
*/
public function renders_JS_tags_correctly()
{
@@ -60,7 +60,7 @@ public function renders_JS_tags_correctly()
/**
* @test
- * @covers Themer\Variable::renderJSPlaintext
+ * @covers Themer\Theme\Variable::renderJSPlaintext
*/
public function renders_JSPlaintext_tags_correctly()
{
@@ -77,7 +77,7 @@ public function renders_JSPlaintext_tags_correctly()
/**
* @test
- * @covers Themer\Variable::renderURLEncoded
+ * @covers Themer\Theme\Variable::renderURLEncoded
*/
public function renders_URLEncoded_tags_correctly()
{
@@ -94,12 +94,12 @@ public function renders_URLEncoded_tags_correctly()
/**
* @test
- * @covers Themer\Variable::render
- * @covers Themer\Variable::renderSimple
- * @covers Themer\Variable::renderPlaintext
- * @covers Themer\Variable::renderJS
- * @covers Themer\Variable::renderJSPlaintext
- * @covers Themer\Variable::renderURLEncoded
+ * @covers Themer\Theme\Variable::render
+ * @covers Themer\Theme\Variable::renderSimple
+ * @covers Themer\Theme\Variable::renderPlaintext
+ * @covers Themer\Theme\Variable::renderJS
+ * @covers Themer\Theme\Variable::renderJSPlaintext
+ * @covers Themer\Theme\Variable::renderURLEncoded
*/
public function renders_multiple_variable_occurrences_in_a_given_block()
{
@@ -133,8 +133,8 @@ public function renders_multiple_variable_occurrences_in_a_given_block()
/**
* @test
- * @covers Themer\Variable::render
- * @covers Themer\Variable::renderSimple
+ * @covers Themer\Theme\Variable::render
+ * @covers Themer\Theme\Variable::renderSimple
*/
public function does_not_transform_non_transformable_variable_tags()
{
@@ -162,7 +162,7 @@ public function does_not_transform_non_transformable_variable_tags()
/**
* @test
- * @covers Themer\Variable::renderArray
+ * @covers Themer\Theme\Variable::renderArray
*/
public function renders_an_array_of_variables()
{
@@ -196,4 +196,4 @@ public function renders_an_array_of_variables()
}
}
/* End of file VariableTest.php */
-/* Location: ./test/Themer/VariableTest.php */
+/* Location: ./test/Themer/Theme/VariableTest.php */

0 comments on commit cbb3991

Please sign in to comment.
Something went wrong with that request. Please try again.