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)); }
function testReallyHorribleRecursiveStructure() { $nasty = new RecursiveNasty(); $ref =& $nasty; $hopeful = new ReferenceExpectation($nasty); $this->assertTrue($hopeful->test($ref)); }