Пример #1
0
 def test_should_parse_file(self):
     # given
     vim_config = {"g:phpunit_tmpfile": self.TEMP_FILE_PATH,
                   "g:phpunit_debug": "0"}
     vim.eval = Mock(side_effect=_eval_side_effect(vim_config))
     # when
     phpunit.parse_test_output()
     # then
     self.assertFalse(phpunit.print_error.called)
Пример #2
0
 def test_should_throw_exception_when_not_find_tmp_file(self):
     # given
     vim_config = {"g:phpunit_tmpfile": "random_file.out",
                   "g:phpunit_debug": "0"}
     vim.eval = Mock(side_effect=_eval_side_effect(vim_config))
     # when
     phpunit.parse_test_output()
     # then
     phpunit.print_error.assert_any_call("Failed to find or open the PHPUnit"
                                         + " error log - the command may have"
                                         + " failed")