Ejemplo n.º 1
0
 /**
  * @test
  */
 public function convertDomainObjectsToIdentityArraysConvertsDomainObjects()
 {
     $mockDomainObject1 = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity', array('dummy'));
     $mockDomainObject1->_set('uid', '123');
     $mockDomainObject2 = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity', array('dummy'));
     $mockDomainObject2->_set('uid', '321');
     $expectedResult = array('foo' => array('bar' => 'baz'), 'domainObject1' => '123', 'second' => array('domainObject2' => '321'));
     $actualResult = $this->uriBuilder->_call('convertDomainObjectsToIdentityArrays', array('foo' => array('bar' => 'baz'), 'domainObject1' => $mockDomainObject1, 'second' => array('domainObject2' => $mockDomainObject2)));
     $this->assertEquals($expectedResult, $actualResult);
 }
Ejemplo n.º 2
0
 /**
  * @dataProvider convertIteratorToArrayConvertsIteratorsToArrayProvider
  * @test
  */
 public function convertIteratorToArrayConvertsIteratorsToArray($iterator)
 {
     $result = $this->uriBuilder->_call('convertIteratorToArray', $iterator);
     $this->assertTrue(is_array($result));
 }