Beispiel #1
0
 public function testArrayCount()
 {
     $d1 = 23;
     $d2 = 'string it';
     $d3 = 'more';
     $d4 = 'd4';
     $s = new Stack();
     $s->takeReference($d1);
     $s->takeReference($d2);
     $this->assertCount(2, $s);
     $p = $s->pop();
     $this->assertCount(1, $s);
     $d3 = 'when it all falls down';
     $s->takeReference($d3);
     $this->assertCount(2, $s);
 }
Beispiel #2
0
 public function testTakeReferenceFromReference()
 {
     $data = $this->getData();
     $s = new Stack();
     $s->takeReference($data[0]);
     $ref =& $data['bees'];
     $s->takeReference($ref);
     $ref = 'i hear your voice just calling me';
 }