TYPO3 CMS  TYPO3_6-2
ProcessedFileRepositoryTest.php
Go to the documentation of this file.
1 <?php
3 
21 
25  public function cleanUnavailableColumnsWorks() {
26  $fixture = $this->getAccessibleMock('TYPO3\\CMS\\Core\\Resource\\ProcessedFileRepository', array('dummy'), array(), '', FALSE);
27  $databaseMock = $this->getAccessibleMock('TYPO3\\CMS\\Core\\Database\\DatabaseConnection', array('admin_get_fields'));
28  $databaseMock->expects($this->once())->method('admin_get_fields')->will($this->returnValue(array('storage' => '', 'checksum' => '')));
29  $fixture->_set('databaseConnection', $databaseMock);
30 
31  $actual = $fixture->_call('cleanUnavailableColumns', array('storage' => 'a', 'checksum' => 'b', 'key3' => 'c'));
32 
33  $this->assertSame(array('storage' => 'a', 'checksum' => 'b'), $actual);
34  }
35 
36 }
getAccessibleMock( $originalClassName, array $methods=array(), array $arguments=array(), $mockClassName='', $callOriginalConstructor=TRUE, $callOriginalClone=TRUE, $callAutoload=TRUE)