summaryrefslogtreecommitdiff
path: root/tests/test_tools/simpletest/selector.php
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2016-03-25 17:55:51 +0100
committerFabio Bas <ctrlaltca@gmail.com>2016-03-25 17:55:51 +0100
commita3388622287e218beddfa14a47ed677d4307b36b (patch)
tree1b4c7ac8597b1cc798b6683d4a81c90d38de12f6 /tests/test_tools/simpletest/selector.php
parentc7fd3e1167b6f2fa7746edbd0fb8f8c1694c61f9 (diff)
Removed simpletest and moved all tests in the unit tree
Tests are executed now, but a lot of them need fixing.
Diffstat (limited to 'tests/test_tools/simpletest/selector.php')
-rw-r--r--tests/test_tools/simpletest/selector.php132
1 files changed, 0 insertions, 132 deletions
diff --git a/tests/test_tools/simpletest/selector.php b/tests/test_tools/simpletest/selector.php
deleted file mode 100644
index 6af21ff6..00000000
--- a/tests/test_tools/simpletest/selector.php
+++ /dev/null
@@ -1,132 +0,0 @@
-<?php
- /**
- * Base include file for SimpleTest.
- * @package SimpleTest
- * @subpackage WebTester
- * @version $Id: selector.php 1398 2006-09-08 19:31:03Z xue $
- */
-
- /**#@+
- * include SimpleTest files
- */
- require_once(dirname(__FILE__) . '/tag.php');
- require_once(dirname(__FILE__) . '/encoding.php');
- /**#@-*/
-
- /**
- * Used to extract form elements for testing against.
- * Searches by name attribute.
- * @package SimpleTest
- * @subpackage WebTester
- */
- class SimpleByName {
- protected $_name;
-
- /**
- * Stashes the name for later comparison.
- * @param string $name Name attribute to match.
- */
- function SimpleByName($name) {
- $this->_name = $name;
- }
-
- /**
- * Compares with name attribute of widget.
- * @param SimpleWidget $widget Control to compare.
- * @access public
- */
- function isMatch($widget) {
- return ($widget->getName() == $this->_name);
- }
- }
-
- /**
- * Used to extract form elements for testing against.
- * Searches by visible label or alt text.
- * @package SimpleTest
- * @subpackage WebTester
- */
- class SimpleByLabel {
- protected $_label;
-
- /**
- * Stashes the name for later comparison.
- * @param string $label Visible text to match.
- */
- function SimpleByLabel($label) {
- $this->_label = $label;
- }
-
- /**
- * Comparison. Compares visible text of widget or
- * related label.
- * @param SimpleWidget $widget Control to compare.
- * @access public
- */
- function isMatch($widget) {
- if (! method_exists($widget, 'isLabel')) {
- return false;
- }
- return $widget->isLabel($this->_label);
- }
- }
-
- /**
- * Used to extract form elements for testing against.
- * Searches dy id attribute.
- * @package SimpleTest
- * @subpackage WebTester
- */
- class SimpleById {
- protected $_id;
-
- /**
- * Stashes the name for later comparison.
- * @param string $id ID atribute to match.
- */
- function SimpleById($id) {
- $this->_id = $id;
- }
-
- /**
- * Comparison. Compares id attribute of widget.
- * @param SimpleWidget $widget Control to compare.
- * @access public
- */
- function isMatch($widget) {
- return $widget->isId($this->_id);
- }
- }
-
- /**
- * Used to extract form elements for testing against.
- * Searches by visible label, name or alt text.
- * @package SimpleTest
- * @subpackage WebTester
- */
- class SimpleByLabelOrName {
- protected $_label;
-
- /**
- * Stashes the name/label for later comparison.
- * @param string $label Visible text to match.
- */
- function SimpleByLabelOrName($label) {
- $this->_label = $label;
- }
-
- /**
- * Comparison. Compares visible text of widget or
- * related label or name.
- * @param SimpleWidget $widget Control to compare.
- * @access public
- */
- function isMatch($widget) {
- if (method_exists($widget, 'isLabel')) {
- if ($widget->isLabel($this->_label)) {
- return true;
- }
- }
- return ($widget->getName() == $this->_label);
- }
- } \ No newline at end of file