Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

FormatContext tests.

  • Loading branch information...
commit 0de2799dfcac71b37795450a3afcdaccf569668e 1 parent 67ad0be
@simensen simensen authored
Showing with 38 additions and 0 deletions.
  1. +38 −0 src/Sculpin/Core/Tests/Formatter/FormatContextTest.php
View
38 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());
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.