我发现了一个类似的问题Adding flex-active class to the li instead of a/img
但是这个解决方案并没有从活动的li兄弟中删除flex-active类。
我也会发布代码以供参考
if($to){
$s = (int)format_time($start);
$e = (int)format_time($end);
function ct($time){
$timezone_offset = 14400000; //EST vs UTC in ms
return new MongoDB\BSON\UTCDateTime(strtotime($time)*1000 + $timezone_offset);
}
function now_in_mongo($offset = 0){
return new MongoDB\BSON\UTCDateTime(time()*1000 + $offset*1000);
}
function format_time($time){
if(strlen($time) != 6){
$time = "0$time";
}
$date = new DateTime($time);
$date->add(new DateInterval('PT4H'));
return $date->format('His');
}
任何帮助都会很棒!
答案 0 :(得分:0)
我找到了这个解决方案,它对我有用
class Test {
public void print(RestTemplate restTemplate){
restTemplate.getForObject("url", String.class);
}
}
class TestTest {
private final Test instance = new Test();
@Test
public testPrint() {
RestTemplate restTemplateMock = mock(RestTemplate.class);
instance.print(restTemplateMock);
// TODO: verify method calls on the mock
}
}