protected function CommentAlterImageTest::getImageFiles in Comment Alter 8
Gets a list of images to be used in the test.
Return value
array $images The file objects representing the image files.
2 calls to CommentAlterImageTest::getImageFiles()
- CommentAlterImageTest::testImageFieldMultiple in tests/
src/ Functional/ CommentAlterImageTest.php - Tests for multi valued image field comment altering.
- CommentAlterImageTest::testImageFieldSingle in tests/
src/ Functional/ CommentAlterImageTest.php - Tests for single valued image field comment altering.
File
- tests/
src/ Functional/ CommentAlterImageTest.php, line 40
Class
- CommentAlterImageTest
- Tests the comment alter module functions for image fields.
Namespace
Drupal\Tests\comment_alter\FunctionalCode
protected function getImageFiles() {
$original = drupal_get_path('module', 'simpletest') . '/files';
$images = file_scan_directory($original, '/image-.*/');
foreach ($images as $image) {
file_unmanaged_copy($image->uri, \Drupal\Core\StreamWrapper\PublicStream::basePath());
}
return $images;
}