assert_mocks) { \Mockery::close(); } else { \Mockery::getContainer()->mockery_close(); \Mockery::resetContainer(); } } public function _failed(TestInterface $test, $fail) { $this->assert_mocks = false; } }