‪TYPO3CMS  9.5
PersistentObjectConverterTest.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
26 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
27 
31 class ‪PersistentObjectConverterTest extends UnitTestCase
32 {
36  protected ‪$converter;
37 
41  protected ‪$mockReflectionService;
42 
47 
52 
56  protected ‪$mockContainer;
57 
63  protected function ‪setUp()
64  {
65  $this->converter = new ‪PersistentObjectConverter();
66  $this->mockReflectionService = $this->createMock(\‪TYPO3\CMS\‪Extbase\Reflection\ReflectionService::class);
67  $this->inject($this->converter, 'reflectionService', $this->mockReflectionService);
68 
69  $this->mockPersistenceManager = $this->createMock(\‪TYPO3\CMS\‪Extbase\Persistence\PersistenceManagerInterface::class);
70  $this->inject($this->converter, 'persistenceManager', $this->mockPersistenceManager);
71 
72  $this->mockObjectManager = $this->createMock(\‪TYPO3\CMS\‪Extbase\Object\ObjectManagerInterface::class);
73  $this->mockObjectManager->expects($this->any())
74  ->method('get')
75  ->will($this->returnCallback(function ($className, ...$arguments) {
76  $reflectionClass = new \ReflectionClass($className);
77  if (empty($arguments)) {
78  return $reflectionClass->newInstance();
79  }
80  return $reflectionClass->newInstanceArgs($arguments);
81  }));
82  $this->inject($this->converter, 'objectManager', $this->mockObjectManager);
83 
84  $this->mockContainer = $this->createMock(\‪TYPO3\CMS\‪Extbase\Object\Container\Container::class);
85  $this->inject($this->converter, 'objectContainer', $this->mockContainer);
86  }
87 
91  public function ‪checkMetadata()
92  {
93  $this->assertEquals(['integer', 'string', 'array'], $this->converter->getSupportedSourceTypes(), 'Source types do not match');
94  $this->assertEquals('object', $this->converter->getSupportedTargetType(), 'Target type does not match');
95  $this->assertEquals(20, $this->converter->getPriority(), 'Priority does not match');
96  }
97 
101  public function ‪dataProviderForCanConvert()
102  {
103  return [
104  [true, false, true],
105  // is entity => can convert
106  [false, true, true],
107  // is valueobject => can convert
108  [false, false, false],
109  // is no entity and no value object => can not convert
110  ];
111  }
112 
117  public function ‪canConvertFromReturnsTrueIfClassIsTaggedWithEntityOrValueObject($isEntity, $isValueObject, $expected)
118  {
119  $className = PersistentObjectFixture::class;
120 
121  if ($isEntity) {
122  $className = PersistentObjectEntityFixture::class;
123  } elseif ($isValueObject) {
124  $className = PersistentObjectValueObjectFixture::class;
125  }
126  $this->assertEquals($expected, $this->converter->canConvertFrom('myInputData', $className));
127  }
128 
133  {
134  $source = [
135  'k1' => 'v1',
136  '__identity' => 'someIdentity',
137  'k2' => 'v2'
138  ];
139  $expected = [
140  'k1' => 'v1',
141  'k2' => 'v2'
142  ];
143  $this->assertEquals($expected, $this->converter->getSourceChildPropertiesToBeConverted($source));
144  }
145 
150  {
151  $mockSchema = $this->getMockBuilder(\‪TYPO3\CMS\‪Extbase\Reflection\ClassSchema::class)->disableOriginalConstructor()->getMock();
152  $this->mockReflectionService->expects($this->any())->method('getClassSchema')->with('TheTargetType')->will($this->returnValue($mockSchema));
153 
154  $this->mockContainer->expects($this->any())->method('getImplementationClassName')->will($this->returnValue('TheTargetType'));
155  $mockSchema->expects($this->any())->method('hasProperty')->with('thePropertyName')->will($this->returnValue(true));
156  $mockSchema->expects($this->any())->method('getProperty')->with('thePropertyName')->will($this->returnValue([
157  'type' => 'TheTypeOfSubObject',
158  'elementType' => null
159  ]));
160  $configuration = $this->‪buildConfiguration([]);
161  $this->assertEquals('TheTypeOfSubObject', $this->converter->getTypeOfChildProperty('TheTargetType', 'thePropertyName', $configuration));
162  }
163 
168  {
169  $this->mockReflectionService->expects($this->never())->method('getClassSchema');
170  $this->mockContainer->expects($this->any())->method('getImplementationClassName')->will($this->returnValue('foo'));
171 
172  $configuration = $this->‪buildConfiguration([]);
173  $configuration->forProperty('thePropertyName')->setTypeConverterOption(\‪TYPO3\CMS\‪Extbase\Property\TypeConverter\PersistentObjectConverter::class, ‪PersistentObjectConverter::CONFIGURATION_TARGET_TYPE, 'Foo\Bar');
174  $this->assertEquals('Foo\Bar', $this->converter->getTypeOfChildProperty('foo', 'thePropertyName', $configuration));
175  }
176 
181  {
182  $identifier = '17';
183  $object = new \stdClass();
184 
185  $this->mockPersistenceManager->expects($this->any())->method('getObjectByIdentifier')->with($identifier)->will($this->returnValue($object));
186  $this->assertSame($object, $this->converter->convertFrom($identifier, 'MySpecialType'));
187  }
188 
193  {
194  $identifier = '17';
195  $object = new \stdClass();
196 
197  $this->mockPersistenceManager->expects($this->any())->method('getObjectByIdentifier')->with($identifier)->will($this->returnValue($object));
198  $this->assertSame($object, $this->converter->convertFrom($identifier, 'MySpecialType'));
199  }
200 
205  {
206  $identifier = '12345';
207  $object = new \stdClass();
208 
209  $source = [
210  '__identity' => $identifier
211  ];
212  $this->mockPersistenceManager->expects($this->any())->method('getObjectByIdentifier')->with($identifier)->will($this->returnValue($object));
213  $this->assertSame($object, $this->converter->convertFrom($source, 'MySpecialType'));
214  }
215 
220  {
221  $this->expectException(InvalidPropertyMappingConfigurationException::class);
222  $this->expectExceptionCode(1297932028);
223  $identifier = '12345';
224  $object = new \stdClass();
225  $object->someProperty = 'asdf';
226 
227  $source = [
228  '__identity' => $identifier,
229  'foo' => 'bar'
230  ];
231  $this->mockPersistenceManager->expects($this->any())->method('getObjectByIdentifier')->with($identifier)->will($this->returnValue($object));
232  $this->converter->convertFrom($source, 'MySpecialType');
233  }
234 
239  protected function ‪buildConfiguration($typeConverterOptions)
240  {
241  $configuration = new \TYPO3\CMS\Extbase\Property\PropertyMappingConfiguration();
242  $configuration->setTypeConverterOptions(\‪TYPO3\CMS\‪Extbase\Property\TypeConverter\PersistentObjectConverter::class, $typeConverterOptions);
243  return $configuration;
244  }
245 
251  public function ‪setupMockQuery($numberOfResults, $howOftenIsGetFirstCalled)
252  {
253  $mockClassSchema = $this->getMockBuilder(\‪TYPO3\CMS\‪Extbase\Reflection\ClassSchema::class)
254  ->setConstructorArgs([\‪TYPO3\CMS\‪Extbase\Tests\Unit\Property\TypeConverter\Fixtures\Query::class])
255  ->getMock();
256  $mockClassSchema->expects($this->any())->method('getIdentityProperties')->will($this->returnValue(['key1' => 'someType']));
257  $this->mockReflectionService->expects($this->any())->method('getClassSchema')->with('SomeType')->will($this->returnValue($mockClassSchema));
258 
259  $mockConstraint = $this->getMockBuilder(\‪TYPO3\CMS\‪Extbase\Persistence\Generic\Qom\Comparison::class)->disableOriginalConstructor()->getMock();
260 
261  $mockObject = new \stdClass();
262  $mockQuery = $this->createMock(\‪TYPO3\CMS\‪Extbase\Persistence\QueryInterface::class);
263  $mockQueryResult = $this->createMock(\‪TYPO3\CMS\‪Extbase\Persistence\QueryResultInterface::class);
264  $mockQueryResult->expects($this->any())->method('count')->will($this->returnValue($numberOfResults));
265  $mockQueryResult->expects($howOftenIsGetFirstCalled)->method('getFirst')->will($this->returnValue($mockObject));
266  $mockQuery->expects($this->any())->method('equals')->with('key1', 'value1')->will($this->returnValue($mockConstraint));
267  $mockQuery->expects($this->any())->method('matching')->with($mockConstraint)->will($this->returnValue($mockQuery));
268  $mockQuery->expects($this->any())->method('execute')->will($this->returnValue($mockQueryResult));
269 
270  $this->mockPersistenceManager->expects($this->any())->method('createQueryForType')->with('SomeType')->will($this->returnValue($mockQuery));
271 
272  return $mockObject;
273  }
274 
279  {
280  $this->expectException(TargetNotFoundException::class);
281  $this->expectExceptionCode(1297933823);
282  $this->‪setupMockQuery(0, $this->never());
283  $this->mockReflectionService->expects($this->never())->method('getClassSchema');
284 
285  $source = [
286  '__identity' => 123
287  ];
288  $actual = $this->converter->convertFrom($source, 'SomeType');
289  $this->assertNull($actual);
290  }
291 
296  {
297  $this->expectException(DuplicateObjectException::class);
298  // @TODO expectExceptionCode is 0
299  $this->‪setupMockQuery(2, $this->never());
300 
301  $source = [
302  '__identity' => 666
303  ];
304  $this->mockPersistenceManager
305  ->expects($this->any())
306  ->method('getObjectByIdentifier')
307  ->with(666)
308  ->will($this->throwException(new ‪DuplicateObjectException('testing', 1476107580)));
309  $this->converter->convertFrom($source, 'SomeType');
310  }
311 
316  {
317  $this->expectException(InvalidPropertyMappingConfigurationException::class);
318  // @TODO expectExceptionCode is 0
319  $source = [
320  'foo' => 'bar'
321  ];
322  $this->converter->convertFrom($source, 'MySpecialType');
323  }
324 
328  public function ‪convertFromShouldCreateObject()
329  {
330  $source = [
331  'propertyX' => 'bar'
332  ];
333  $convertedChildProperties = [
334  'property1' => 'bar'
335  ];
336  $expectedObject = new \TYPO3\CMS\Extbase\Tests\Fixture\ClassWithSetters();
337  $expectedObject->property1 = 'bar';
338 
339  $this->mockReflectionService
340  ->expects($this->any())
341  ->method('getMethodParameters')
342  ->with(\‪TYPO3\CMS\‪Extbase\Tests\Fixture\ClassWithSetters::class, '__construct')
343  ->will($this->throwException(new \ReflectionException('testing', 1476107618)));
345  $result = $this->converter->convertFrom($source, \‪TYPO3\CMS\‪Extbase\Tests\Fixture\ClassWithSetters::class, $convertedChildProperties, $configuration);
346  $this->assertEquals($expectedObject, $result);
347  }
348 
353  {
354  $this->expectException(InvalidTargetException::class);
355  $this->expectExceptionCode(1297935345);
356  $source = [
357  'propertyX' => 'bar'
358  ];
359  $object = new \TYPO3\CMS\Extbase\Tests\Fixture\ClassWithSetters();
360  $convertedChildProperties = [
361  'propertyNotExisting' => 'bar'
362  ];
363  $this->mockObjectManager->expects($this->any())->method('get')->with(\‪TYPO3\CMS\‪Extbase\Tests\Fixture\ClassWithSetters::class)->will($this->returnValue($object));
364  $this->mockReflectionService->expects($this->any())->method('getMethodParameters')->with(\‪TYPO3\CMS\‪Extbase\Tests\Fixture\ClassWithSetters::class, '__construct')->will($this->returnValue([]));
366  $result = $this->converter->convertFrom($source, \‪TYPO3\CMS\‪Extbase\Tests\Fixture\ClassWithSetters::class, $convertedChildProperties, $configuration);
367  $this->assertSame($object, $result);
368  }
369 
374  {
375  $classSchemaMock = $this->createMock(ClassSchema::class);
376  $classSchemaMock
377  ->expects($this->any())
378  ->method('getMethod')
379  ->with('__construct')
380  ->willReturn([
381  'params' => [
382  'property1' => ['optional' => false]
383  ]
384  ]);
385 
386  $classSchemaMock
387  ->expects($this->any())
388  ->method('hasConstructor')
389  ->willReturn(true);
390 
391  $this->mockReflectionService
392  ->expects($this->any())
393  ->method('getClassSchema')
394  ->with(\‪TYPO3\CMS\‪Extbase\Tests\Fixture\ClassWithSettersAndConstructor::class)
395  ->willReturn($classSchemaMock);
396 
397  $source = [
398  'propertyX' => 'bar'
399  ];
400  $convertedChildProperties = [
401  'property1' => 'param1',
402  'property2' => 'bar'
403  ];
404  $expectedObject = new \TYPO3\CMS\Extbase\Tests\Fixture\ClassWithSettersAndConstructor('param1');
405  $expectedObject->setProperty2('bar');
406 
407  $this->mockContainer->expects($this->any())->method('getImplementationClassName')->will($this->returnValue(\‪TYPO3\CMS\‪Extbase\Tests\Fixture\ClassWithSettersAndConstructor::class));
409  $result = $this->converter->convertFrom($source, \‪TYPO3\CMS\‪Extbase\Tests\Fixture\ClassWithSettersAndConstructor::class, $convertedChildProperties, $configuration);
410  $this->assertEquals($expectedObject, $result);
411  $this->assertEquals('bar', $expectedObject->getProperty2());
412  }
413 
418  {
419  $classSchemaMock = $this->createMock(ClassSchema::class);
420  $classSchemaMock
421  ->expects($this->any())
422  ->method('getMethod')
423  ->with('__construct')
424  ->willReturn([
425  'params' => [
426  'property1' => ['optional' => true, 'defaultValue' => 'thisIsTheDefaultValue']
427  ]
428  ]);
429 
430  $classSchemaMock
431  ->expects($this->any())
432  ->method('hasConstructor')
433  ->willReturn(true);
434 
435  $this->mockReflectionService
436  ->expects($this->any())
437  ->method('getClassSchema')
438  ->with(\‪TYPO3\CMS\‪Extbase\Tests\Fixture\ClassWithSettersAndConstructor::class)
439  ->willReturn($classSchemaMock);
440 
441  $source = [
442  'propertyX' => 'bar'
443  ];
444  $expectedObject = new \TYPO3\CMS\Extbase\Tests\Fixture\ClassWithSettersAndConstructor('thisIsTheDefaultValue');
445 
446  $this->mockContainer->expects($this->any())->method('getImplementationClassName')->will($this->returnValue(\‪TYPO3\CMS\‪Extbase\Tests\Fixture\ClassWithSettersAndConstructor::class));
448  $result = $this->converter->convertFrom($source, \‪TYPO3\CMS\‪Extbase\Tests\Fixture\ClassWithSettersAndConstructor::class, [], $configuration);
449  $this->assertEquals($expectedObject, $result);
450  }
451 
456  {
457  $classSchemaMock = $this->createMock(ClassSchema::class);
458  $classSchemaMock
459  ->expects($this->any())
460  ->method('getMethod')
461  ->with('__construct')
462  ->willReturn([
463  'params' => [
464  'property1' => ['optional' => false]
465  ]
466  ]);
467 
468  $classSchemaMock
469  ->expects($this->any())
470  ->method('hasConstructor')
471  ->willReturn(true);
472 
473  $this->mockReflectionService
474  ->expects($this->any())
475  ->method('getClassSchema')
476  ->with(\‪TYPO3\CMS\‪Extbase\Tests\Fixture\ClassWithSettersAndConstructor::class)
477  ->willReturn($classSchemaMock);
478 
479  $this->expectException(InvalidTargetException::class);
480  $this->expectExceptionCode(1268734872);
481  $source = [
482  'propertyX' => 'bar'
483  ];
484  $object = new \TYPO3\CMS\Extbase\Tests\Fixture\ClassWithSettersAndConstructor('param1');
485  $convertedChildProperties = [
486  'property2' => 'bar'
487  ];
488 
489  $this->mockContainer->expects($this->any())->method('getImplementationClassName')->will($this->returnValue(\‪TYPO3\CMS\‪Extbase\Tests\Fixture\ClassWithSettersAndConstructor::class));
491  $result = $this->converter->convertFrom($source, \‪TYPO3\CMS\‪Extbase\Tests\Fixture\ClassWithSettersAndConstructor::class, $convertedChildProperties, $configuration);
492  $this->assertSame($object, $result);
493  }
494 
499  {
500  $source = '';
501  $result = $this->converter->convertFrom($source, \‪TYPO3\CMS\‪Extbase\Tests\Fixture\ClassWithSettersAndConstructor::class);
502  $this->assertNull($result);
503  }
504 }
‪TYPO3\CMS\Extbase\Property\TypeConverter\ObjectConverter\CONFIGURATION_TARGET_TYPE
‪const CONFIGURATION_TARGET_TYPE
Definition: ObjectConverter.php:25
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\getTypeOfChildPropertyShouldUseReflectionServiceToDetermineType
‪getTypeOfChildPropertyShouldUseReflectionServiceToDetermineType()
Definition: PersistentObjectConverterTest.php:144
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\convertFromShouldFetchObjectFromPersistenceIfuidStringIsGiven
‪convertFromShouldFetchObjectFromPersistenceIfuidStringIsGiven()
Definition: PersistentObjectConverterTest.php:187
‪TYPO3\CMS\Extbase\Annotation
Definition: IgnoreValidation.php:4
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\dataProviderForCanConvert
‪array dataProviderForCanConvert()
Definition: PersistentObjectConverterTest.php:96
‪TYPO3\CMS\Extbase\Property\Exception\DuplicateObjectException
Definition: DuplicateObjectException.php:21
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\buildConfiguration
‪TYPO3 CMS Extbase Property PropertyMappingConfiguration buildConfiguration($typeConverterOptions)
Definition: PersistentObjectConverterTest.php:234
‪TYPO3
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\convertFromShouldThrowExceptionIfMoreThanOneObjectWasFound
‪convertFromShouldThrowExceptionIfMoreThanOneObjectWasFound()
Definition: PersistentObjectConverterTest.php:290
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter
Definition: ArrayConverterTest.php:2
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\convertFromShouldFetchObjectFromPersistenceIfOnlyIdentityArrayGiven
‪convertFromShouldFetchObjectFromPersistenceIfOnlyIdentityArrayGiven()
Definition: PersistentObjectConverterTest.php:199
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\convertFromShouldThrowExceptionIfObjectNeedsToBeCreatedButConfigurationIsNotSet
‪convertFromShouldThrowExceptionIfObjectNeedsToBeCreatedButConfigurationIsNotSet()
Definition: PersistentObjectConverterTest.php:310
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\checkMetadata
‪checkMetadata()
Definition: PersistentObjectConverterTest.php:86
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\Fixtures\PersistentObjectValueObjectFixture
Definition: PersistentObjectValueObjectFixture.php:23
‪TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter\CONFIGURATION_CREATION_ALLOWED
‪const CONFIGURATION_CREATION_ALLOWED
Definition: PersistentObjectConverter.php:39
‪TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter
Definition: PersistentObjectConverter.php:30
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\$converter
‪TYPO3 CMS Extbase Property TypeConverterInterface PHPUnit_Framework_MockObject_MockObject $converter
Definition: PersistentObjectConverterTest.php:35
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\$mockContainer
‪TYPO3 CMS Extbase Object Container Container PHPUnit_Framework_MockObject_MockObject $mockContainer
Definition: PersistentObjectConverterTest.php:51
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\Fixtures\PersistentObjectFixture
Definition: PersistentObjectFixture.php:21
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\convertFromShouldReturnNullForEmptyString
‪convertFromShouldReturnNullForEmptyString()
Definition: PersistentObjectConverterTest.php:493
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\Fixtures\PersistentObjectEntityFixture
Definition: PersistentObjectEntityFixture.php:23
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\convertFromShouldCreateObjectWhenThereAreOptionalConstructorParameters
‪convertFromShouldCreateObjectWhenThereAreOptionalConstructorParameters()
Definition: PersistentObjectConverterTest.php:412
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\convertFromShouldCreateObject
‪convertFromShouldCreateObject()
Definition: PersistentObjectConverterTest.php:323
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\$mockObjectManager
‪TYPO3 CMS Extbase Object ObjectManagerInterface PHPUnit_Framework_MockObject_MockObject $mockObjectManager
Definition: PersistentObjectConverterTest.php:47
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\getSourceChildPropertiesToBeConvertedReturnsAllPropertiesExceptTheIdentityProperty
‪getSourceChildPropertiesToBeConvertedReturnsAllPropertiesExceptTheIdentityProperty()
Definition: PersistentObjectConverterTest.php:127
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\getTypeOfChildPropertyShouldUseConfiguredTypeIfItWasSet
‪getTypeOfChildPropertyShouldUseConfiguredTypeIfItWasSet()
Definition: PersistentObjectConverterTest.php:162
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\canConvertFromReturnsTrueIfClassIsTaggedWithEntityOrValueObject
‪canConvertFromReturnsTrueIfClassIsTaggedWithEntityOrValueObject($isEntity, $isValueObject, $expected)
Definition: PersistentObjectConverterTest.php:112
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\convertFromShouldFetchObjectFromPersistenceIfUuidStringIsGiven
‪convertFromShouldFetchObjectFromPersistenceIfUuidStringIsGiven()
Definition: PersistentObjectConverterTest.php:175
‪TYPO3\CMS\Extbase\Property\Exception\InvalidPropertyMappingConfigurationException
Definition: InvalidPropertyMappingConfigurationException.php:21
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\setUp
‪setUp()
Definition: PersistentObjectConverterTest.php:58
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\$mockPersistenceManager
‪TYPO3 CMS Extbase Persistence PersistenceManagerInterface PHPUnit_Framework_MockObject_MockObject $mockPersistenceManager
Definition: PersistentObjectConverterTest.php:43
‪TYPO3\CMS\Extbase\Property\Exception\InvalidTargetException
Definition: InvalidTargetException.php:21
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\convertFromShouldCreateObjectWhenThereAreConstructorParameters
‪convertFromShouldCreateObjectWhenThereAreConstructorParameters()
Definition: PersistentObjectConverterTest.php:368
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\convertFromShouldThrowExceptionIfRequiredConstructorParameterWasNotFound
‪convertFromShouldThrowExceptionIfRequiredConstructorParameterWasNotFound()
Definition: PersistentObjectConverterTest.php:450
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest
Definition: PersistentObjectConverterTest.php:32
‪TYPO3\CMS\Extbase\Reflection\ClassSchema
Definition: ClassSchema.php:41
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\$mockReflectionService
‪TYPO3 CMS Extbase Reflection ReflectionService PHPUnit_Framework_MockObject_MockObject $mockReflectionService
Definition: PersistentObjectConverterTest.php:39
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\convertFromShouldReturnExceptionIfNoMatchingObjectWasFound
‪convertFromShouldReturnExceptionIfNoMatchingObjectWasFound()
Definition: PersistentObjectConverterTest.php:273
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\convertFromShouldThrowExceptionIfPropertyOnTargetObjectCouldNotBeSet
‪convertFromShouldThrowExceptionIfPropertyOnTargetObjectCouldNotBeSet()
Definition: PersistentObjectConverterTest.php:347
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\convertFromShouldThrowExceptionIfObjectNeedsToBeModifiedButConfigurationIsNotSet
‪convertFromShouldThrowExceptionIfObjectNeedsToBeModifiedButConfigurationIsNotSet()
Definition: PersistentObjectConverterTest.php:214
‪TYPO3\CMS\Extbase\Property\Exception\TargetNotFoundException
Definition: TargetNotFoundException.php:21
‪TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest\setupMockQuery
‪stdClass setupMockQuery($numberOfResults, $howOftenIsGetFirstCalled)
Definition: PersistentObjectConverterTest.php:246