[!!!][TASK] Replace ClassInfo with ClassSchema
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Tests / Unit / Property / TypeConverter / PersistentObjectConverterTest.php
index c0f5f07..a289057 100644 (file)
@@ -32,7 +32,7 @@ use TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\Fixtures\PersistentObjec
 /**
  * Test case
  */
-class PersistentObjectConverterTest extends \TYPO3\CMS\Components\TestingFramework\Core\UnitTestCase
+class PersistentObjectConverterTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
 {
     /**
      * @var \TYPO3\CMS\Extbase\Property\TypeConverterInterface|\PHPUnit_Framework_MockObject_MockObject
@@ -61,7 +61,7 @@ class PersistentObjectConverterTest extends \TYPO3\CMS\Components\TestingFramewo
 
     /**
      * @throws \InvalidArgumentException
-     * @throws \PHPUnit_Framework_Exception
+     * @throws \PHPUnit\Framework\Exception
      * @throws \RuntimeException
      */
     protected function setUp()
@@ -80,9 +80,8 @@ class PersistentObjectConverterTest extends \TYPO3\CMS\Components\TestingFramewo
                 $reflectionClass = new \ReflectionClass($className);
                 if (empty($arguments)) {
                     return $reflectionClass->newInstance();
-                } else {
-                    return $reflectionClass->newInstanceArgs($arguments);
                 }
+                return $reflectionClass->newInstanceArgs($arguments);
             }));
         $this->inject($this->converter, 'objectManager', $this->mockObjectManager);
 
@@ -256,7 +255,7 @@ class PersistentObjectConverterTest extends \TYPO3\CMS\Components\TestingFramewo
     public function setupMockQuery($numberOfResults, $howOftenIsGetFirstCalled)
     {
         $mockClassSchema = $this->getMockBuilder(\TYPO3\CMS\Extbase\Reflection\ClassSchema::class)
-            ->setConstructorArgs(['Dummy'])
+            ->setConstructorArgs([\TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\Fixtures\Query::class])
             ->getMock();
         $mockClassSchema->expects($this->any())->method('getIdentityProperties')->will($this->returnValue(['key1' => 'someType']));
         $this->mockReflectionService->expects($this->any())->method('getClassSchema')->with('SomeType')->will($this->returnValue($mockClassSchema));