$data[] =
[new BooleanData(DataDefinition::
create('boolean'
)), 'test', FALSE
];
$data[] =
[new FloatData(DataDefinition::
create('float'
)), 1.5, TRUE
];
$data[] =
[new FloatData(DataDefinition::
create('float'
)), 'test', FALSE
];
$data[] =
[new IntegerData(DataDefinition::
create('integer'
)), 1, TRUE
];
$data[] =
[new IntegerData(DataDefinition::
create('integer'
)), 1.5, FALSE
];
$data[] =
[new IntegerData(DataDefinition::
create('integer'
)), 'test', FALSE
];
$data[] =
[new StringData(DataDefinition::
create('string'
)), 'test', TRUE
];
$data[] =
[new StringData(DataDefinition::
create('string'
)),
new TranslatableMarkup('test'
), TRUE
];
// It is odd that 1 is a valid string.
// $data[] = [$this->createMock('Drupal\Core\TypedData\Type\StringInterface'), 1, FALSE];
$data[] =
[new StringData(DataDefinition::
create('string'
)),
[], FALSE
];
$data[] =
[new Uri(DataDefinition::
create('uri'
)), 'http://www.example.com', TRUE
];
$data[] =
[new Uri(DataDefinition::
create('uri'
)), 'https://www.example.com', TRUE
];
$data[] =
[new Uri(DataDefinition::
create('uri'
)), 'Invalid', FALSE
];
$data[] =
[new Uri(DataDefinition::
create('uri'
)), 'entity:node/1', TRUE
];
$data[] =
[new Uri(DataDefinition::
create('uri'
)), 'base:', TRUE
];
$data[] =
[new Uri(DataDefinition::
create('uri'
)), 'base:node', TRUE
];
$data[] =
[new Uri(DataDefinition::
create('uri'
)), 'internal:', TRUE
];
$data[] =
[new Uri(DataDefinition::
create('uri'
)), 'public://', FALSE
];
$data[] =
[new Uri(DataDefinition::
create('uri'
)), 'public://foo.png', TRUE
];
$data[] =
[new Uri(DataDefinition::
create('uri'
)), 'private://', FALSE
];
$data[] =
[new Uri(DataDefinition::
create('uri'
)), 'private://foo.png', TRUE
];
$data[] =
[new Uri(DataDefinition::
create('uri'
)), 'example.com', FALSE
];