@@ 45-54 (lines=10) @@ | ||
42 | ||
43 | // Copy test images for each of the fixture references |
|
44 | $imageIDs = $this->allFixtureIDs('Image'); |
|
45 | foreach ($imageIDs as $imageID) { |
|
46 | $image = DataObject::get_by_id('Image', $imageID); |
|
47 | $filePath = BASE_PATH."/$image->Filename"; |
|
48 | $sourcePath = str_replace('assets/SectionTest/', 'section-io/tests/testfiles/', $filePath); |
|
49 | if (!file_exists($filePath)) { |
|
50 | if (!copy($sourcePath, $filePath)) { |
|
51 | user_error('Failed to copy test images', E_USER_ERROR); |
|
52 | } |
|
53 | } |
|
54 | } |
|
55 | ||
56 | // Copy test files for each of the fixture references |
|
57 | $fileIDs = $this->allFixtureIDs('File'); |
|
@@ 58-67 (lines=10) @@ | ||
55 | ||
56 | // Copy test files for each of the fixture references |
|
57 | $fileIDs = $this->allFixtureIDs('File'); |
|
58 | foreach ($fileIDs as $fileID) { |
|
59 | $file = DataObject::get_by_id('File', $fileID); |
|
60 | $filePath = BASE_PATH."/$file->Filename"; |
|
61 | $sourcePath = str_replace('assets/SectionTest/', 'section-io/tests/testfiles/', $filePath); |
|
62 | if (!file_exists($filePath)) { |
|
63 | if (!copy($sourcePath, $filePath)) { |
|
64 | user_error('Failed to copy test files', E_USER_ERROR); |
|
65 | } |
|
66 | } |
|
67 | } |
|
68 | } |
|
69 | ||
70 | public function tearDownOnce() |