Drupal 8  8.0.2
EntityFileTest Class Reference
Inheritance diagram for EntityFileTest:

Public Member Functions

 testSuccessfulCopies ()
 
 testNonExistentSourceFile ()
 
 testWriteFile ()
 
 testGetDirectory ()
 
 testIsLocationUnchanged ()
 
 testIsLocalUri ()
 

Static Public Attributes

static $modules = array('system', 'entity_test', 'user', 'file')
 

Protected Member Functions

 setUp ()
 
 localFileDataProvider ()
 
 doImport ($row_values, $destination_path, $source_base_path= '')
 

Protected Attributes

 $destination
 

Detailed Description

Tests the entity file destination plugin.

file

Member Function Documentation

doImport (   $row_values,
  $destination_path,
  $source_base_path = '' 
)
protected

Do an import using the destination.

Parameters
array$row_valuesAn array of row values.
string$destination_pathThe destination path to copy to.
string$source_base_pathThe source base path.
Returns
array An array of saved entities ids.
Exceptions
\Drupal\migrate\MigrateException

References Drupal\destination().

Referenced by EntityFileTest\testNonExistentSourceFile(), and EntityFileTest\testSuccessfulCopies().

Here is the call graph for this function:

Here is the caller graph for this function:

localFileDataProvider ( )
protected

The data provider for testing the file destination.

Returns
array An array of file permutations to test.

Referenced by EntityFileTest\testSuccessfulCopies().

Here is the caller graph for this function:

setUp ( )
protected

{}

References Drupal\destination(), and Drupal\getContainer().

Here is the call graph for this function:

testGetDirectory ( )

Tests various invocations of the getDirectory() method.

References Settings\get(), and Drupal\getContainer().

Here is the call graph for this function:

testIsLocalUri ( )

Tests various invocations of the isLocalUri() method.

testIsLocationUnchanged ( )

Tests various invocations of the isLocationUnchanged() method.

References Settings\get().

Here is the call graph for this function:

testNonExistentSourceFile ( )

Test that non-existent files throw an exception.

References EntityFileTest\doImport().

Here is the call graph for this function:

testSuccessfulCopies ( )

Test successful imports/copies.

References EntityFileTest\doImport(), and EntityFileTest\localFileDataProvider().

Here is the call graph for this function:

testWriteFile ( )

Tests various invocations of the writeFile() method.

References FILE_EXISTS_RENAME.


The documentation for this class was generated from the following file: