helly Sun Jun 1 12:41:53 2003 EDT
Modified files:
/spl/tests foreach.phpt foreach_break.phpt forward.phpt
sequence.phpt
Log:
Simplify by using __METHOD__
Index: spl/tests/foreach.phpt
diff -u spl/tests/foreach.phpt:1.2 spl/tests/foreach.phpt:1.3
--- spl/tests/foreach.phpt:1.2 Sat May 24 09:47:49 2003
+++ spl/tests/foreach.phpt Sun Jun 1 12:41:53 2003
@@ -13,20 +13,20 @@
$this->obj = $obj;
}
function current() {
- echo __CLASS__ . '::' . __FUNCTION__ . "\n";
+ echo __METHOD__ . "\n";
return $this->num;
}
function next() {
- echo __CLASS__ . '::' . __FUNCTION__ . "\n";
+ echo __METHOD__ . "\n";
$this->num++;
}
function has_more() {
$more = $this->num < $this->obj->max;
- echo __CLASS__ . '::' . __FUNCTION__ . ' = ' .($more ? 'true' :
'false') . "\n";
+ echo __METHOD__ . ' = ' .($more ? 'true' : 'false') . "\n";
return $more;
}
function key() {
- echo __CLASS__ . '::' . __FUNCTION__ . "\n";
+ echo __METHOD__ . "\n";
switch($this->num) {
case 0: return "1st";
case 1: return "2nd";
@@ -41,7 +41,7 @@
public $max = 3;
function new_iterator() {
- echo __CLASS__ . '::' . __FUNCTION__ . "\n";
+ echo __METHOD__ . "\n";
return new c_iter($this);
}
}
Index: spl/tests/foreach_break.phpt
diff -u spl/tests/foreach_break.phpt:1.1 spl/tests/foreach_break.phpt:1.2
--- spl/tests/foreach_break.phpt:1.1 Sun May 25 15:24:29 2003
+++ spl/tests/foreach_break.phpt Sun Jun 1 12:41:53 2003
@@ -13,20 +13,20 @@
$this->obj = $obj;
}
function current() {
- echo __CLASS__ . '::' . __FUNCTION__ . "\n";
+ echo __METHOD__ . "\n";
return $this->num;
}
function next() {
- echo __CLASS__ . '::' . __FUNCTION__ . "\n";
+ echo __METHOD__ . "\n";
$this->num++;
}
function has_more() {
$more = $this->num < $this->obj->max;
- echo __CLASS__ . '::' . __FUNCTION__ . ' = ' .($more ? 'true' :
'false') . "\n";
+ echo __METHOD__ . ' = ' .($more ? 'true' : 'false') . "\n";
return $more;
}
function key() {
- echo __CLASS__ . '::' . __FUNCTION__ . "\n";
+ echo __METHOD__ . "\n";
switch($this->num) {
case 0: return "1st";
case 1: return "2nd";
@@ -41,7 +41,7 @@
public $max = 3;
function new_iterator() {
- echo __CLASS__ . '::' . __FUNCTION__ . "\n";
+ echo __METHOD__ . "\n";
return new c_iter($this);
}
}
Index: spl/tests/forward.phpt
diff -u spl/tests/forward.phpt:1.2 spl/tests/forward.phpt:1.3
--- spl/tests/forward.phpt:1.2 Mon May 26 18:06:49 2003
+++ spl/tests/forward.phpt Sun Jun 1 12:41:53 2003
@@ -10,19 +10,19 @@
public $num = 0;
function current() {
- echo __CLASS__ . '::' . __FUNCTION__ . "\n";
+ echo __METHOD__ . "\n";
return $this->num;
}
function next() {
- echo __CLASS__ . '::' . __FUNCTION__ . "\n";
+ echo __METHOD__ . "\n";
$this->num++;
}
function has_more() {
- echo __CLASS__ . '::' . __FUNCTION__ . "\n";
+ echo __METHOD__ . "\n";
return $this->num < $this->max;
}
function key() {
- echo __CLASS__ . '::' . __FUNCTION__ . "\n";
+ echo __METHOD__ . "\n";
switch($this->num) {
case 0: return "1st";
case 1: return "2nd";
Index: spl/tests/sequence.phpt
diff -u spl/tests/sequence.phpt:1.1.1.1 spl/tests/sequence.phpt:1.2
--- spl/tests/sequence.phpt:1.1.1.1 Thu May 1 19:28:28 2003
+++ spl/tests/sequence.phpt Sun Jun 1 12:41:53 2003
@@ -9,7 +9,7 @@
public $max = 3;
function new_iterator() {
- echo __CLASS__ . '::' . __FUNCTION__ . "\n";
+ echo __METHOD__ . "\n";
return new c_iter($this);
}
}
@@ -23,23 +23,23 @@
$this->obj = $obj;
}
function rewind() {
- echo __CLASS__ . '::' . __FUNCTION__ . "\n";
+ echo __METHOD__ . "\n";
$this->num = 0;
}
function current() {
- echo __CLASS__ . '::' . __FUNCTION__ . "\n";
+ echo __METHOD__ . "\n";
return $this->num;
}
function next() {
- echo __CLASS__ . '::' . __FUNCTION__ . "\n";
+ echo __METHOD__ . "\n";
$this->num++;
}
function has_more() {
- echo __CLASS__ . '::' . __FUNCTION__ . "\n";
+ echo __METHOD__ . "\n";
return $this->num < $this->obj->max;
}
function key() {
- echo __CLASS__ . '::' . __FUNCTION__ . "\n";
+ echo __METHOD__ . "\n";
switch($this->num) {
case 0: return "1st";
case 1: return "2nd";
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php