From 3ff67b3bc185be255d0b54f7f9af7c9578b4330b Mon Sep 17 00:00:00 2001
From: Brenda Wallace <shiny@cpan.org>
Date: Tue, 25 Aug 2009 10:33:16 +1200
Subject: [PATCH] beginning of hashtag tests

---
 tests/HashTagDetectionTest.php | 35 ++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 tests/HashTagDetectionTest.php

diff --git a/tests/HashTagDetectionTest.php b/tests/HashTagDetectionTest.php
new file mode 100644
index 0000000000..71137b0b54
--- /dev/null
+++ b/tests/HashTagDetectionTest.php
@@ -0,0 +1,35 @@
+<?php
+
+if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
+    print "This script must be run from the command line\n";
+    exit();
+}
+
+define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
+define('LACONICA', true);
+
+require_once INSTALLDIR . '/lib/common.php';
+
+class HashTagDetectionTest extends PHPUnit_Framework_TestCase
+{
+    /**
+     * @dataProvider provider
+     *
+     */
+    public function testProduction($content, $expected)
+    {
+        $rendered = common_render_text($content);
+        $this->assertEquals($expected, $rendered);
+    }
+
+    static public function provider()
+    {
+        return array(
+                     array('hello',
+                           'hello'),
+                     array('#hello',
+                           '<a href="/tag/hello">hello</a>'),
+                     );
+    }
+}
+
-- 
2.39.5