测试类扩展了抽象类(Angular 5,Jasmine,Karma)

时间:2019-01-23 08:47:27

标签: angular jasmine karma-jasmine extends testunit

我想测试$objects = [ "", "abc", 0, 0.0, 0.1, 1, 1.1, 25, null, [], [1], new stdClass(), ]; foreach ($objects as $obj) { $state = "false"; if ($obj) { $state = "true"; } if (is_string($obj)) { if (strlen($obj) == 0) { $obj = "\"\""; } else { $obj = "\"{$obj}\""; } } if (is_array($obj)) { if (count($obj) == 0) { $obj = "[]"; } else { $obj = json_encode($obj); } } if (is_null($obj)) { $obj = "null"; } if (is_object($obj)) { $obj = "object(stdClass)"; } echo str_pad((string)$obj, 5, " ") . " -> {$state}" . PHP_EOL; } ,但是它总是返回错误,如何运行测试并在aclass.component.ts中调用Bclass

Aclass.spec.ts

0 个答案:

没有答案