# Zend tests

- Thread: https://externals.io/message/30316
- Original archive: https://news-web.php.net/php.internals/30316
- Started by Zoe Slattery on 2007-06-22T07:58:26+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #30316 — Zoe Slattery — 2007-06-22T07:58:26+00:00

URL: https://externals.io/message/30316#30316

Hi

I started to look at the test coverage of the Zend engine this week. I 
tried to commit  a couple of small tests (see PHP6 versions below) but 
looks like my CVS ID doesn't let me commit to Zend/tests.

Would it be possible to upgrade me so that I can commit tests to 
Zend/tests as well as ext/standard/tests?

The tests I wanted to add were to check when class constants get 
initialised, I think this behaviour changed recently in PHP5 (the second 
test used to have output 'string(10) "const in B"'). The current 
behaviour looks correct and I couldn't see a test that already covers this.

selfParent_001.phpt
==============

--TEST--
Test when constants are initialised. See also selfParent_002.phpt.
--FILE--
<?php
class A {
      const myConst = "const in A";
      const myDynConst = self::myConst;   

      public static function test() {
            var_dump(self::myDynConst);
      }
}

 class B extends A {
      const myConst = "const in B";

      public static function test() {
            var_dump(parent::myDynConst);
      }
}

A::test();
B::test();
?>
--EXPECT--
string(10) "const in A"
string(10) "const in A"
--UEXPECT--
unicode(10) "const in A"
unicode(10) "const in A"

selfParent_002.phpt
==============

--TEST--
Test when constants are initialised. See also selfParent_001.phpt.
--FILE--
<?php
class A {
      const myConst = "const in A";
      const myDynConst = self::myConst;   

      public static function test() {
            var_dump(self::myDynConst);
      }
}
class B extends A {
      const myConst = "const in B";

      public static function test() {
            var_dump(parent::myDynConst);
      }
}
B::test();
A::test();
?>
--EXPECT--
string(10) "const in A"
string(10) "const in A"
--UEXPECT--
unicode(10) "const in A"
unicode(10) "const in A"

Zoe Slattery
IBM

---

## #30317 — Derick Rethans — 2007-06-22T08:19:52+00:00

URL: https://externals.io/message/30316#30317 · In reply to: #30316

> I started to look at the test coverage of the Zend engine this week. I tried
> to commit  a couple of small tests (see PHP6 versions below) but looks like my
> CVS ID doesn't let me commit to Zend/tests.
> 
> Would it be possible to upgrade me so that I can commit tests to Zend/tests as
> well as ext/standard/tests?

Fixed, you now have access to:
php-src, pecl and all phpdoc-*
ZendEngine2/tests

regards,
Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org
