コード例 #1
0
 /**
  * Setup
  */
 public function setUp()
 {
     parent::setUp();
     $this->propertyManager = new \TYPO3\CMS\Extbase\Property\PropertyMapper();
     $configurationBuilder = new \TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationBuilder();
     $this->inject($this->propertyManager, 'configurationBuilder', $configurationBuilder);
     $this->inject($this->propertyManager, 'objectManager', $this->objectManager);
     $this->propertyManager->initializeObject();
     $dummyList = new \stdClass();
     $dummyList->id = '{0344CAA0-94D5-40DE-A6EC-0D551BAC869D}';
     $dummyList->title = 'Kontakte';
     $this->fixtureList[] = $dummyList;
     $dummyList = new \stdClass();
     $dummyList->id = '{BF306B2A-CBB7-4284-A17C-BEC46F3FE6C1}';
     $dummyList->title = 'Artikel';
     $this->fixtureList[] = $dummyList;
     $this->sharepointHandler = $this->getMockBuilder('Thybag\\SharePointAPI')->disableOriginalConstructor()->getMock();
     $this->sharepointHandler->expects($this->any())->method('setReturnType')->will($this->returnValue(''));
     $this->sharepointHandler->expects($this->any())->method('getLists')->will($this->returnValue($this->fixtureList));
 }