rasmus                                   Sun, 08 Jan 2012 18:21:13 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=321934

Log:
This test only works if gc is enabled

Changed paths:
    U   php/php-src/branches/PHP_5_4/ext/spl/tests/bug53071.phpt

Modified: php/php-src/branches/PHP_5_4/ext/spl/tests/bug53071.phpt
===================================================================
--- php/php-src/branches/PHP_5_4/ext/spl/tests/bug53071.phpt    2012-01-08 
18:03:56 UTC (rev 321933)
+++ php/php-src/branches/PHP_5_4/ext/spl/tests/bug53071.phpt    2012-01-08 
18:21:13 UTC (rev 321934)
@@ -1,26 +1,27 @@
---TEST--
-Bug #53071 (Usage of SPLObjectStorage defeats gc_collect_cycles)
---FILE--
-<?php
-class myClass
-{
-       public $member;
-}
-function LimitedScope()
-{
-       $myA = new myClass();
-       $myB = new SplObjectStorage();
-       $myC = new myClass();
-       $myC->member = $myA; // myC has a referece to myA
-       $myB->Attach($myC);  // myB attaches myC
-       $myA->member = $myB; // myA has myB, comleting the cycle
-}
-LimitedScope();
-var_dump(gc_collect_cycles());
-
-echo "Done.\n";
-
-?>
---EXPECTF--
-int(5)
-Done.
+--TEST--
+Bug #53071 (Usage of SPLObjectStorage defeats gc_collect_cycles)
+--FILE--
+<?php
+gc_enable();
+class myClass
+{
+       public $member;
+}
+function LimitedScope()
+{
+       $myA = new myClass();
+       $myB = new SplObjectStorage();
+       $myC = new myClass();
+       $myC->member = $myA; // myC has a referece to myA
+       $myB->Attach($myC);  // myB attaches myC
+       $myA->member = $myB; // myA has myB, comleting the cycle
+}
+LimitedScope();
+var_dump(gc_collect_cycles());
+
+echo "Done.\n";
+
+?>
+--EXPECTF--
+int(5)
+Done.

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to