标签:assertions

  • PHPUnit断言真一(1) - php

    时间:2020-8-17

    我正在查看PHPUnit,以下内容使我感到困惑。 PHPUnit是否处理int。 1和0为布尔值?在我目前的测试中,没有。 示例:$this->assertTrue(preg_match('/asdf/', 'asdf')); 在我的测试中,此操作失败,因为preg_match()返回int 1或0,并且只有在出 […]