Exemplo n.º 1
0
 /**
  * @test
  */
 public function updateRootlineDataOverwritesOwnArrayData()
 {
     $originalRootline = array(0 => array('uid' => 2, 'title' => 'originalTitle'), 1 => array('uid' => 3, 'title' => 'originalTitle2'));
     $updatedRootline = array(0 => array('uid' => 1, 'title' => 'newTitle'), 1 => array('uid' => 2, 'title' => 'newTitle2'), 2 => array('uid' => 3, 'title' => 'newTitle3'));
     $expectedRootline = array(0 => array('uid' => 2, 'title' => 'newTitle2'), 1 => array('uid' => 3, 'title' => 'newTitle3'));
     $this->templateServiceMock->_set('rootLine', $originalRootline);
     $this->templateServiceMock->updateRootlineData($updatedRootline);
     $this->assertEquals($expectedRootline, $this->templateServiceMock->_get('rootLine'));
 }