Skip to content
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

Ralferlebach unit tests politome items #689

Merged
merged 12 commits into from
Oct 10, 2024

Conversation

ralferlebach
Copy link
Contributor

No description provided.

@davidszkiba davidszkiba force-pushed the ralferlebach-unit-tests-politome-items branch 2 times, most recently from a91fe9d to eb4d2a1 Compare October 8, 2024 08:42
davidszkiba and others added 12 commits October 8, 2024 12:18
* implement unit-tests for person ability: likelihood, 1st & 2nd derivate of log likelihood
* implement helper methods for sanitizing, sorting, extracting fractions and getting keys
* fixing all coding styles issunes of UNIT tests (moodle 4.4 requirements)
   ✘ Read item param from db with data set "grmgeneralized"
   │
   │ Failed asserting that two arrays are equal.
   │ --- Expected
   │ +++ Actual
   │ @@ @@
   │  Array (
   │      'difficulties' => Array (...)
   │      'discrimination' => 5.92
   │ -    'difficulty' => 0.59
   │  )
   │
   │ /home/runner/work/moodle-local_catquiz/moodle-local_catquiz/moodle/local/catquiz/tests/local/model/model_item_param_test.php:56
   │ /home/runner/work/moodle-local_catquiz/moodle-local_catquiz/moodle/lib/phpunit/classes/advanced_testcase.php:72
   │

 ✘ Read item param from db with data set "grm"
   │
   │ Failed asserting that two arrays are equal.
   │ --- Expected
   │ +++ Actual
   │ @@ @@
   │  Array (
   │      'difficulties' => Array (...)
   │ -    'difficulty' => 0.59
   │ +    'discrimination' => 5.92
   │  )
   │
   │ /home/runner/work/moodle-local_catquiz/moodle-local_catquiz/moodle/local/catquiz/tests/local/model/model_item_param_test.php:56
   │ /home/runner/work/moodle-local_catquiz/moodle-local_catquiz/moodle/lib/phpunit/classes/advanced_testcase.php:72
   │

✘ Read item param from db with data set "pcmgeneralized"
   │
   │ Failed asserting that two arrays are equal.
   │ --- Expected
   │ +++ Actual
   │ @@ @@
   │  Array (
   │ -    'difficulty' => 0.7
   │      'discrimination' => 2.1
   │      'intercepts' => Array (...)
   │  )
   │
   │ /home/runner/work/moodle-local_catquiz/moodle-local_catquiz/moodle/local/catquiz/tests/local/model/model_item_param_test.php:56
   │ /home/runner/work/moodle-local_catquiz/moodle-local_catquiz/moodle/lib/phpunit/classes/advanced_testcase.php:72
   │

 ✘ Read item param from db with data set "pcm"
   │
   │ Failed asserting that two arrays are equal.
   │ --- Expected
   │ +++ Actual
   │ @@ @@
   │  Array (
   │ -    'difficulty' => 0.68
   │      'intercepts' => Array (...)
   │  )
   │
   │ /home/runner/work/moodle-local_catquiz/moodle-local_catquiz/moodle/local/catquiz/tests/local/model/model_item_param_test.php:56
   │ /home/runner/work/moodle-local_catquiz/moodle-local_catquiz/moodle/lib/phpunit/classes/advanced_testcase.php:72
   │

strategy_test (local_catquiz\strategy_test)
 ✔ Import worked
 ✔ Import overrides with data set "update with simulation_beta.csv"
 ✘ Import csv with polytomous model
   │
   │ Array to string conversion
   │
   │ /home/runner/work/moodle-local_catquiz/moodle-local_catquiz/moodle/local/catquiz/tests/teststrategy/strategy_test.php:188
   │ /home/runner/work/moodle-local_catquiz/moodle-local_catquiz/moodle/lib/phpunit/classes/advanced_testcase.php:72
   │

model_item_param_test (local_catquiz\local\model\model_item_param_test)
 ✘ Read item param from db with data set "grmgeneralized"
   │
   │ Failed asserting that two arrays are equal.
   │ --- Expected
   │ +++ Actual
   │ @@ @@
   │  Array (
   │      'difficulties' => Array (...)
   │      'discrimination' => 5.92
   │ -    'difficulty' => 0.59
   │  )
   │
   │ /home/runner/work/moodle-local_catquiz/moodle-local_catquiz/moodle/local/catquiz/tests/local/model/model_item_param_test.php:56
   │ /home/runner/work/moodle-local_catquiz/moodle-local_catquiz/moodle/lib/phpunit/classes/advanced_testcase.php:72
   │

 ✘ Read item param from db with data set "grm"
   │
   │ Failed asserting that two arrays are equal.
   │ --- Expected
   │ +++ Actual
   │ @@ @@
   │  Array (
   │      'difficulties' => Array (...)
   │ -    'difficulty' => 0.59
   │ +    'discrimination' => 5.92
   │  )
   │
   │ /home/runner/work/moodle-local_catquiz/moodle-local_catquiz/moodle/local/catquiz/tests/local/model/model_item_param_test.php:56
   │ /home/runner/work/moodle-local_catquiz/moodle-local_catquiz/moodle/lib/phpunit/classes/advanced_testcase.php:72
   │

 ✘ Read item param from db with data set "pcmgeneralized"
   │
   │ Failed asserting that two arrays are equal.
   │ --- Expected
   │ +++ Actual
   │ @@ @@
   │  Array (
   │ -    'difficulty' => 0.7
   │      'discrimination' => 2.1
   │      'intercepts' => Array (...)
   │  )
   │
   │ /home/runner/work/moodle-local_catquiz/moodle-local_catquiz/moodle/local/catquiz/tests/local/model/model_item_param_test.php:56
   │ /home/runner/work/moodle-local_catquiz/moodle-local_catquiz/moodle/lib/phpunit/classes/advanced_testcase.php:72
   │

 ✘ Read item param from db with data set "pcm"
   │
   │ Failed asserting that two arrays are equal.
   │ --- Expected
   │ +++ Actual
   │ @@ @@
   │  Array (
   │ -    'difficulty' => 0.68
   │      'intercepts' => Array (...)
   │  )
   │
   │ /home/runner/work/moodle-local_catquiz/moodle-local_catquiz/moodle/local/catquiz/tests/local/model/model_item_param_test.php:56
   │ /home/runner/work/moodle-local_catquiz/moodle-local_catquiz/moodle/lib/phpunit/classes/advanced_testcase.php:72
   │

strategy_test (local_catquiz\strategy_test)
 ✘ Import csv with polytomous model
   │
   │ Array to string conversion
   │
   │ /home/runner/work/moodle-local_catquiz/moodle-local_catquiz/moodle/local/catquiz/tests/teststrategy/strategy_test.php:188
   │ /home/runner/work/moodle-local_catquiz/moodle-local_catquiz/moodle/lib/phpunit/classes/advanced_testcase.php:72
   │
@davidszkiba davidszkiba force-pushed the ralferlebach-unit-tests-politome-items branch from d6e0de2 to b4538b2 Compare October 8, 2024 10:20
@davidszkiba davidszkiba merged commit b6a6f3c into develop Oct 10, 2024
18 of 22 checks passed
@davidszkiba davidszkiba deleted the ralferlebach-unit-tests-politome-items branch October 10, 2024 08:18
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