class RealisticDummyContentValueFieldTest in Realistic Dummy Content 8.2
Same name and namespace in other branches
- 7.2 api/src/test/includes/RealisticDummyContentValueFieldTest.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentValueFieldTest
Tests for ...\includes\RealisticDummyContentValueField.
Hierarchy
- class \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentValueFieldTest extends \Drupal\realistic_dummy_content_api\includes\PHPUnit_Framework_TestCase
Expanded class hierarchy of RealisticDummyContentValueFieldTest
File
- api/
src/ test/ includes/ RealisticDummyContentValueFieldTest.php, line 42
Namespace
Drupal\realistic_dummy_content_api\includesView source
class RealisticDummyContentValueFieldTest extends \PHPUnit_Framework_TestCase {
/**
* Test that empty files and non-existing files are treated differently.
*/
public function testEmpty() {
$field = new RealisticDummyContentValueField('ignore entity', 'ignore name');
$null = new DummyFile(NULL);
$empty = new DummyFile('');
$this
->assertFalse(is_array($field
->implementValueFromFile($null)), 'No applicable field value is represented by NULL.');
$this
->assertTrue(is_array($field
->implementValueFromFile($empty)), 'An empty string is considered a valid value.');
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RealisticDummyContentValueFieldTest:: |
public | function | Test that empty files and non-existing files are treated differently. |