Permalink
Browse files

FormatContext tests.

  • Loading branch information...
1 parent 67ad0be commit 0de2799dfcac71b37795450a3afcdaccf569668e @simensen simensen committed Aug 11, 2012
Showing with 38 additions and 0 deletions.
  1. +38 −0 src/Sculpin/Core/Tests/Formatter/FormatContextTest.php
@@ -0,0 +1,38 @@
+<?php
+
+/*
+ * This file is a part of Sculpin.
+ *
+ * (c) Dragonfly Development Inc.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Sculpin\Core\Tests\Formatter;
+
+use Sculpin\Core\Formatter\FormatContext;
+
+/**
+ * FormatContext Test.
+ *
+ * @author Beau Simensen <beau@dflydev.com>
+ */
+class FormatContextTest extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * Test.
+ */
+ public function test()
+ {
+ $formatContext = new FormatContext('someTemplateId', 'template text', array(
+ 'a' => 'Some A Value',
+ 'formatter' => 'SOME_FORMATTER',
+ ));
+
+ $this->assertEquals('someTemplateId', $formatContext->templateId());
+ $this->assertEquals('template text', $formatContext->template());
+ $this->assertEquals(array('a' => 'Some A Value', 'formatter' => 'SOME_FORMATTER', ), $formatContext->data()->export());
+ $this->assertEquals('SOME_FORMATTER', $formatContext->formatter());
+ }
+}

0 comments on commit 0de2799

Please sign in to comment.