improves tika test messages and skipping
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 31 Jul 2017 15:57:23 +0000 (17:57 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 31 Jul 2017 16:58:15 +0000 (18:58 +0200)
Change-Id: Ifda12d045c8a5b80b9d47d80d49686fb053d1f9c
Reviewed-on: http://gerrit.tine20.com/customers/5362
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tests/tine20/Filemanager/Frontend/JsonTests.php
tests/tine20/Tinebase/FileSystemTest.php

index 344db27..feca4cc 100644 (file)
@@ -1866,6 +1866,11 @@ class Filemanager_Frontend_JsonTests extends TestCase
 
     public function testRecursiveFilter()
     {
+        // check for tika installation
+        if ('' == Tinebase_Core::getConfig()->get(Tinebase_Config::FULLTEXT)->{Tinebase_Config::FULLTEXT_TIKAJAR}) {
+            self::markTestSkipped('no tika.jar found');
+        }
+
         $folders = $this->testCreateDirectoryNodesInPersonal();
         $prefix = Tinebase_FileSystem::getInstance()->getApplicationBasePath('Filemanager') . '/folders';
 
@@ -1901,7 +1906,7 @@ class Filemanager_Frontend_JsonTests extends TestCase
             ),
         ), null);
 
-        $this->assertEquals(2, $result['totalcount'], 'did not find expected 2 files: ' . print_r($result, true));
+        $this->assertEquals(2, $result['totalcount'], 'did not find expected 2 files (is tika.jar installed?): ' . print_r($result, true));
         foreach($result['results'] as $result) {
             $this->assertTrue(in_array($result['path'], $paths), 'result doesn\'t match expected paths: ' . print_r($result, true) . print_r($paths, true));
         }
index 5ea3627..ed2ee04 100644 (file)
@@ -337,7 +337,7 @@ class Tinebase_FileSystemTest extends TestCase
             array('field' => 'isIndexed',   'operator' => 'equals',     'value' => 1),
         ), /* $_condition = */ '', /* $_options */ array('ignoreAcl' => true));
         $result = $this->_controller->search($filter);
-        $this->assertEquals(1, $result->count(), 'didn\'t find file');
+        $this->assertEquals(1, $result->count(), 'didn\'t find file (is tika.jar installed?)');
 
 
         $filter = new Tinebase_Model_Tree_Node_Filter(array(