Exemplo n.º 1
0
 function testReference()
 {
     $foo = "foo";
     $ref =& $foo;
     $not_ref = $foo;
     $bar = "bar";
     $expect = new ReferenceExpectation($foo);
     $this->assertTrue($expect->test($ref));
     $this->assertFalse($expect->test($not_ref));
     $this->assertFalse($expect->test($bar));
 }
Exemplo n.º 2
0
 function testReallyHorribleRecursiveStructure()
 {
     $nasty = new RecursiveNasty();
     $ref =& $nasty;
     $hopeful = new ReferenceExpectation($nasty);
     $this->assertTrue($hopeful->test($ref));
 }