+
+ /**
+ * Test filterHash() with a valid smallhash.
+ */
+ public function testFilterHashValid()
+ {
+ $request = smallHash('20150310_114651');
+ $this->assertEquals(
+ 1,
+ count(self::$publicLinkDB->filterHash($request))
+ );
+ }
+
+ /**
+ * Test filterHash() with an invalid smallhash.
+ *
+ * @expectedException LinkNotFoundException
+ */
+ public function testFilterHashInValid1()
+ {
+ $request = 'blabla';
+ self::$publicLinkDB->filterHash($request);
+ }
+
+ /**
+ * Test filterHash() with an empty smallhash.
+ *
+ * @expectedException LinkNotFoundException
+ */
+ public function testFilterHashInValid()
+ {
+ self::$publicLinkDB->filterHash('');
+ }