22 $wwwPath = dirname(dirname(__DIR__));
24 $container = M::mock(
'ContainerBuilder');
25 $container->shouldReceive(
'get');
26 require_once(dirname($wwwPath).
'/lib/php/Plugin/FO_Plugin.php');
27 if(!function_exists(
'register_plugin')){
function register_plugin(){}}
28 require_once ($wwwPath.
'/ui/ui-picker.php');
37 $container = M::mock(
'ContainerBuilder');
38 $container->shouldReceive(
'get');
41 $reflection = new \ReflectionClass( get_class($uiPicker) );
42 $method = $reflection->getMethod(
'Uploadtree2PathStr');
43 $method->setAccessible(
true);
45 $result = $method->invoke($uiPicker,array(array(
'ufile_name'=>
'path'),array(
'ufile_name'=>
'to'),array(
'ufile_name'=>
'nowhere')));
46 assertThat($result, is(
'/path/to/nowhere'));
test_Uploadtree2PathStr()
test for Uploadtree2PathStr