From 48d6cf6f8890525908f0e941d6e2ed3d05c15dea Mon Sep 17 00:00:00 2001
From: "Meredith L. Patterson" <mlp@thesmartpolitenerd.com>
Date: Sat, 30 Nov 2013 17:17:18 -0800
Subject: [PATCH] h_in and h_not_in also have a wrong param count issue

---
 src/bindings/php/Tests/InTest.php    | 24 ++++++++++++++++++++++++
 src/bindings/php/Tests/NotInTest.php | 24 ++++++++++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100644 src/bindings/php/Tests/InTest.php
 create mode 100644 src/bindings/php/Tests/NotInTest.php

diff --git a/src/bindings/php/Tests/InTest.php b/src/bindings/php/Tests/InTest.php
new file mode 100644
index 00000000..5c2ed8c4
--- /dev/null
+++ b/src/bindings/php/Tests/InTest.php
@@ -0,0 +1,24 @@
+<?php
+include_once 'hammer.php';
+
+class InTest extends PHPUnit_Framework_TestCase
+{
+    protected $parser;
+
+    protected function setUp()
+    {
+        $this->parser = h_in("abc");
+    }
+    public function testSuccess()
+    {
+        $result = h_parse($this->parser, "b");
+        // TODO: fixme when h_ch is fixed
+        $this->assertEquals(98, $result);
+    }
+    public function testFailure()
+    {
+        $result = h_parse($this->parser, "d");
+        $this->assertEquals(NULL, $result);
+    }
+}
+?>
\ No newline at end of file
diff --git a/src/bindings/php/Tests/NotInTest.php b/src/bindings/php/Tests/NotInTest.php
new file mode 100644
index 00000000..44a12a78
--- /dev/null
+++ b/src/bindings/php/Tests/NotInTest.php
@@ -0,0 +1,24 @@
+<?php
+include_once 'hammer.php';
+
+class NotInTest extends PHPUnit_Framework_TestCase
+{
+    protected $parser;
+
+    protected function setUp()
+    {
+        $this->parser = h_not_in("abc");
+    }
+    public function testSuccess()
+    {
+        $result = h_parse($this->parser, "d");
+        // TODO: fixme when h_ch is fixed
+        $this->assertEquals(100, $result);
+    }
+    public function testFailure()
+    {
+        $result = h_parse($this->parser, "b");
+        $this->assertEquals(NULL, $result);
+    }
+}
+?>
\ No newline at end of file
-- 
GitLab