From 0c9ab03fd793dd9eef621b9f9b07b06c01029486 Mon Sep 17 00:00:00 2001
From: "Meredith L. Patterson" <mlp@thesmartpolitenerd.com>
Date: Sun, 1 Dec 2013 21:21:00 -0800
Subject: [PATCH] h_difference works

---
 src/bindings/php/Tests/DifferenceTest.php | 25 +++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 src/bindings/php/Tests/DifferenceTest.php

diff --git a/src/bindings/php/Tests/DifferenceTest.php b/src/bindings/php/Tests/DifferenceTest.php
new file mode 100644
index 00000000..88c1903d
--- /dev/null
+++ b/src/bindings/php/Tests/DifferenceTest.php
@@ -0,0 +1,25 @@
+<?php
+include_once 'hammer.php';
+
+class DifferenceTest extends PHPUnit_Framework_TestCase
+{
+    protected $parser;
+
+    protected function setUp()
+    {
+        $this->parser = h_difference(h_token("ab"), ch("a"));
+    }
+
+    public function testSuccess()
+    {
+        $result = h_parse($this->parser, "ab");
+        $this->assertEquals("ab", $result);
+    }
+
+    public function testFailure()
+    {
+        $result = h_parse($this->parser, "a");
+        $this->assertEquals(NULL, $result);
+    }
+}
+?>
\ No newline at end of file
-- 
GitLab