summaryrefslogtreecommitdiff
path: root/test/HTML5/Parser/InstructionProcessorMock.php
diff options
context:
space:
mode:
authorMatt Farina <[email protected]>2014-05-15 10:23:49 -0400
committerMatt Farina <[email protected]>2014-05-15 10:23:49 -0400
commit692140c902df735c6de2aa0863a4334f585f5f95 (patch)
tree7b21e902caa5da544f6f386ae1bad7f5d0264c01 /test/HTML5/Parser/InstructionProcessorMock.php
parent08711d17ad0dc08626347da9f48b477e2c717925 (diff)
parent30aa8a64547d2f1770489133b96269e9d5907a9a (diff)
Merge pull request #34 from goetas/prs-tests
Fixes the testing errors and makes the tests PSR compatible
Diffstat (limited to 'test/HTML5/Parser/InstructionProcessorMock.php')
-rw-r--r--test/HTML5/Parser/InstructionProcessorMock.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/HTML5/Parser/InstructionProcessorMock.php b/test/HTML5/Parser/InstructionProcessorMock.php
new file mode 100644
index 0000000..86572c7
--- /dev/null
+++ b/test/HTML5/Parser/InstructionProcessorMock.php
@@ -0,0 +1,22 @@
+<?php
+namespace HTML5\Tests\Parser;
+
+class InstructionProcessorMock implements \HTML5\InstructionProcessor {
+
+ public $name = NULL;
+ public $data = NULL;
+ public $count = 0;
+
+ public function process(\DOMElement $element, $name, $data) {
+ $this->name = $name;
+ $this->data = $data;
+ $this->count++;
+
+ $div = $element->ownerDocument->createElement("div");
+ $div->nodeValue = 'foo';
+
+ $element->appendChild($div);
+
+ return $div;
+ }
+} \ No newline at end of file