11 $wwwPath = dirname(dirname(__DIR__));
13 $container = M::mock(
'ContainerBuilder');
14 $container->shouldReceive(
'get');
15 require_once(dirname($wwwPath).
'/lib/php/Plugin/FO_Plugin.php');
16 if(!function_exists(
'register_plugin')){
function register_plugin(){}}
17 require_once ($wwwPath.
'/ui/ui-picker.php');
26 $container = M::mock(
'ContainerBuilder');
27 $container->shouldReceive(
'get');
30 $reflection = new \ReflectionClass( get_class($uiPicker) );
31 $method = $reflection->getMethod(
'Uploadtree2PathStr');
32 $method->setAccessible(
true);
34 $result = $method->invoke($uiPicker,array(array(
'ufile_name'=>
'path'),array(
'ufile_name'=>
'to'),array(
'ufile_name'=>
'nowhere')));
35 assertThat($result, is(
'/path/to/nowhere'));
test_Uploadtree2PathStr()
test for Uploadtree2PathStr