$this->assertEqual($before->id(),$after->id(),t('File id is the same: %file1 == %file2.',array('%file1'=>$before->id(),'%file2'=>$after->id())),'File unchanged');
$this->assertEqual($before->getOwner()->id(),$after->getOwner()->id(),t('File owner is the same: %file1 == %file2.',array('%file1'=>$before->getOwner()->id(),'%file2'=>$after->getOwner()->id())),'File unchanged');
$this->assertEqual($before->getFilename(),$after->getFilename(),t('File name is the same: %file1 == %file2.',array('%file1'=>$before->getFilename(),'%file2'=>$after->getFilename())),'File unchanged');
$this->assertEqual($before->getFileUri(),$after->getFileUri(),t('File path is the same: %file1 == %file2.',array('%file1'=>$before->getFileUri(),'%file2'=>$after->getFileUri())),'File unchanged');
$this->assertEqual($before->getMimeType(),$after->getMimeType(),t('File MIME type is the same: %file1 == %file2.',array('%file1'=>$before->getMimeType(),'%file2'=>$after->getMimeType())),'File unchanged');
$this->assertEqual($before->getSize(),$after->getSize(),t('File size is the same: %file1 == %file2.',array('%file1'=>$before->getSize(),'%file2'=>$after->getSize())),'File unchanged');
$this->assertEqual($before->isPermanent(),$after->isPermanent(),t('File status is the same: %file1 == %file2.',array('%file1'=>$before->isPermanent(),'%file2'=>$after->isPermanent())),'File unchanged');
}
/**
* Asserts that two files are not the same by comparing the fid and filepath.
$this->assertNotEqual($file1->id(),$file2->id(),t('Files have different ids: %file1 != %file2.',array('%file1'=>$file1->id(),'%file2'=>$file2->id())),'Different file');
$this->assertNotEqual($file1->getFileUri(),$file2->getFileUri(),t('Files have different paths: %file1 != %file2.',array('%file1'=>$file1->getFileUri(),'%file2'=>$file2->getFileUri())),'Different file');
}
/**
* Asserts that two files are the same by comparing the fid and filepath.
$this->assertEqual($file1->id(),$file2->id(),t('Files have the same ids: %file1 == %file2.',array('%file1'=>$file1->id(),'%file2-fid'=>$file2->id())),'Same file');
$this->assertEqual($file1->getFileUri(),$file2->getFileUri(),t('Files have the same path: %file1 == %file2.',array('%file1'=>$file1->getFileUri(),'%file2'=>$file2->getFileUri())),'Same file');
}
/**
* Create a file and save it to the files table and assert that it occurs
$this->assertEqual($before->id(),$after->id(),t('File id is the same: %file1 == %file2.',array('%file1'=>$before->id(),'%file2'=>$after->id())),'File unchanged');
$this->assertEqual($before->getOwner()->id(),$after->getOwner()->id(),t('File owner is the same: %file1 == %file2.',array('%file1'=>$before->getOwner()->id(),'%file2'=>$after->getOwner()->id())),'File unchanged');
$this->assertEqual($before->getFilename(),$after->getFilename(),t('File name is the same: %file1 == %file2.',array('%file1'=>$before->getFilename(),'%file2'=>$after->getFilename())),'File unchanged');
$this->assertEqual($before->getFileUri(),$after->getFileUri(),t('File path is the same: %file1 == %file2.',array('%file1'=>$before->getFileUri(),'%file2'=>$after->getFileUri())),'File unchanged');
$this->assertEqual($before->getMimeType(),$after->getMimeType(),t('File MIME type is the same: %file1 == %file2.',array('%file1'=>$before->getMimeType(),'%file2'=>$after->getMimeType())),'File unchanged');
$this->assertEqual($before->getSize(),$after->getSize(),t('File size is the same: %file1 == %file2.',array('%file1'=>$before->getSize(),'%file2'=>$after->getSize())),'File unchanged');
$this->assertEqual($before->isPermanent(),$after->isPermanent(),t('File status is the same: %file1 == %file2.',array('%file1'=>$before->isPermanent(),'%file2'=>$after->isPermanent())),'File unchanged');
}
publicstatic$modules=array('system');
/**
* Check that two files are not the same by comparing the fid and filepath.
* A stream wrapper scheme to register for the test.
$this->assertNotEqual($file1->id(),$file2->id(),t('Files have different ids: %file1 != %file2.',array('%file1'=>$file1->id(),'%file2'=>$file2->id())),'Different file');
$this->assertNotEqual($file1->getFileUri(),$file2->getFileUri(),t('Files have different paths: %file1 != %file2.',array('%file1'=>$file1->getFileUri(),'%file2'=>$file2->getFileUri())),'Different file');
}
protected$scheme;
/**
* Check that two files are the same by comparing the fid and filepath.
* A fully-qualified stream wrapper class name to register for the test.
$this->assertEqual($file1->id(),$file2->id(),t('Files have the same ids: %file1 == %file2.',array('%file1'=>$file1->id(),'%file2-fid'=>$file2->id())),'Same file');
$this->assertEqual($file1->getFileUri(),$file2->getFileUri(),t('Files have the same path: %file1 == %file2.',array('%file1'=>$file1->getFileUri(),'%file2'=>$file2->getFileUri())),'Same file');