35 $this->converter = new \TYPO3\CMS\Extbase\Property\TypeConverter\ArrayConverter();
42 $this->assertEquals(array(
'array',
'string'), $this->converter->getSupportedSourceTypes(),
'Source types do not match');
43 $this->assertEquals(
'array', $this->converter->getSupportedTargetType(),
'Target type does not match');
44 $this->assertEquals(1, $this->converter->getPriority(),
'Priority does not match');
51 $sourceArray = array(
'Foo' =>
'Bar',
'Baz');
52 $this->assertEquals($sourceArray, $this->converter->convertFrom($sourceArray,
'array'));
60 'Empty string to empty array' => array(
'', array()),
72 $this->assertEquals($expectedResult, $this->converter->convertFrom($source,
'array'));
80 'Can convert empty string' => array(
'', TRUE),
81 'Can not convert not empty string' => array(
'foo', FALSE),
82 'Can convert array' => array(array(
'foo'), TRUE),
94 $this->assertSame($expectedResult, $this->converter->canConvertFrom($source,
'array'));
canConvertFromEmptyString($source, $expectedResult)
canConvertFromDataProvider()
convertFromDoesNotModifyTheSourceArray()
stringToArrayDataProvider()
canConvertFromReturnsCorrectBooleans($source, $expectedResult)