]> source.dussan.org Git - nextcloud-server.git/commitdiff
move fileView object initialization to testIsTransparent
authorGeorg Ehrke <developer@georgehrke.com>
Fri, 27 Sep 2013 09:01:47 +0000 (11:01 +0200)
committerGeorg Ehrke <developer@georgehrke.com>
Fri, 27 Sep 2013 09:01:47 +0000 (11:01 +0200)
tests/lib/preview.php

index 5dc4a93acc5ccd33d8eec6ec93470f0918b37e28..98659a7e887186194d39b2fcab7f6b826ca0039a 100644 (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;