move fileView object initialization to testIsTransparent

This commit is contained in:
Georg Ehrke 2013-09-27 11:01:47 +02:00
parent aa8a145ba8
commit 1b13101096
1 changed files with 10 additions and 10 deletions

View File

@ -93,27 +93,27 @@ class Preview extends \PHPUnit_Framework_TestCase {
}
public function testTxtBlacklist() {
$user = $this->initFS();
$txt = 'random text file';
$ics = file_get_contents(__DIR__ . '/../data/testcal.ics');
$vcf = file_get_contents(__DIR__ . '/../data/testcontact.vcf');
$rootView = new \OC\Files\View('');
$rootView->mkdir('/'.$user);
$rootView->mkdir('/'.$user.'/files');
return array(
array('txt', $txt, $user, $rootView, false),
array('ics', $ics, $user, $rootView, true),
array('vcf', $vcf, $user, $rootView, true),
array('txt', $txt, false),
array('ics', $ics, true),
array('vcf', $vcf, true),
);
}
/**
* @dataProvider testTxtBlacklist
*/
public function testIsTransparent($test, $data, $user, $rootView, $expectedResult) {
public function testIsTransparent($test, $data, $expectedResult) {
$user = $this->initFS();
$rootView = new \OC\Files\View('');
$rootView->mkdir('/'.$user);
$rootView->mkdir('/'.$user.'/files');
$x = 32;
$y = 32;