/** * Test if we get a reference to the same file back. */ function testFileReference() { $File = new File('user', 1, 'a'); $id = $File->get_md5_ID(); $r = $this->Filelist->add($File); $this->assertEqual($r, true, 'File added.'); $this->assertEqual($this->Filelist->count(), 1, 'Filecount matches.'); $GetFile =& $this->Filelist->get_by_md5_ID($id); #$File =& $this->Filelist->get_by_md5_ID( $id ); $this->assertReference($File, $GetFile, 'Got the same file.'); $this->assertReference($File, $GetFile, 'Got the same file.'); }