Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Unit test fixes #159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 23, 2023
Merged

Unit test fixes #159

merged 3 commits into from
Jan 23, 2023

Conversation

timhunt
Copy link
Collaborator

@timhunt timhunt commented Jan 13, 2023

When I upgarded our to CodeRunner 5.1.1 running on PHP 8.0 we got some issues with the unit tests:

  1. There was an error because of an (unecessary) use statement above the namespace statement in one file.
  2. Someone, or Jobe standbox thinks that PHP is not an aviable language (even though Jobe is implemented in PHP!) So I added a check for the language being available to those unit tests.
  3. And I updated the github action config to: a) Test with PHP8 as well as other versions. b) Run the tests with Moodle 4.1 and master, as well as 4.0. I can see you have been working on fixing some of the fails on the devel branch, so I did not do more.

Let me know if you would like me to change any of this.

This caused errors because you are not allowed anything before the namespace statement.
Not sure how that can be, since Jobe is written in PHP, but this was the case on our system, so we were getting failures.
@timhunt
Copy link
Collaborator Author

timhunt commented Jan 23, 2023

Hi @trampgeek, did you see this?

@trampgeek trampgeek merged commit aa21c70 into trampgeek:master Jan 23, 2023
@trampgeek
Copy link
Owner

Hi Tim, sorry, yes I did see this. I had done a lot of code-polishing on the tests in my development branch so to avoid a merge conflict down the line I just manually merged your changes into development. But I'll merge your pull request into master now anyway and can resolve the conflicts when I merge development back into master later on.

I have two interns working on coderunner over the break. Lots of fun action. But we can't reproduce or explain the 'missing PHP error' you got. Unless someone deliberately removed that functionality by deleting the file php_task.php from /application/libraries but that seems highly unlikely.

Thanks for the pull request and apologies for not acknowledging earlier.

@timhunt
Copy link
Collaborator Author

timhunt commented Jan 24, 2023

No worries. Thanks for merging it.

@timhunt timhunt deleted the fixes branch January 24, 2023 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants