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

Add PHPunit Tests #8

Open
wants to merge 83 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
8ce83e0
phpunit_release01
ThorbenLaprell Sep 28, 2021
682a006
test_seperate_docker
ThorbenLaprell Sep 29, 2021
1fbbbe5
test_seperate_docker
ThorbenLaprell Sep 29, 2021
2ed4863
test_seperate_docker
ThorbenLaprell Sep 29, 2021
6401c59
test_seperate_docker
ThorbenLaprell Sep 29, 2021
bae9060
change_testing
ThorbenLaprell Sep 29, 2021
b98ab53
test_add_mysql
ThorbenLaprell Sep 29, 2021
2fa4b1f
test_add_mysql
ThorbenLaprell Sep 29, 2021
a2a16da
test_add_mysql
ThorbenLaprell Sep 29, 2021
18118f9
test_add_mysqli
ThorbenLaprell Sep 29, 2021
95e6d9e
change_mysqli_ports
ThorbenLaprell Sep 29, 2021
19b6ef4
test_port
ThorbenLaprell Sep 29, 2021
3353e96
phpunit_release02
ThorbenLaprell Sep 29, 2021
93c20e5
phpunit_release
ThorbenLaprell Sep 29, 2021
52d5069
add_week_heatmap_branch
ThorbenLaprell Sep 30, 2021
8f46fd0
get_results
ThorbenLaprell Sep 30, 2021
af0911c
get_data02
ThorbenLaprell Sep 30, 2021
429d5fc
test_daylightsaving
ThorbenLaprell Sep 30, 2021
7f29fde
test_daylight_saving02
ThorbenLaprell Sep 30, 2021
331966e
test_daylight_saving03
ThorbenLaprell Sep 30, 2021
fa52f74
test_daylightsaving04
ThorbenLaprell Sep 30, 2021
cf628fe
test_timezone06
ThorbenLaprell Sep 30, 2021
b724e3c
test_buffer
ThorbenLaprell Sep 30, 2021
5607162
fix_dto
ThorbenLaprell Oct 4, 2021
8e041f7
fix_minor
ThorbenLaprell Oct 4, 2021
e68a1b3
test_dto01
ThorbenLaprell Oct 4, 2021
07dbb9e
test_dto02
ThorbenLaprell Oct 4, 2021
535958d
test_dto03
ThorbenLaprell Oct 4, 2021
f162e4d
test_dto04
ThorbenLaprell Oct 4, 2021
8e4f060
test_dto06
ThorbenLaprell Oct 4, 2021
00bd46a
test_dto06
ThorbenLaprell Oct 4, 2021
4e893ed
fix_dto_pgsql01_and_add_new_test
ThorbenLaprell Oct 4, 2021
73905b2
fix_bug01
ThorbenLaprell Oct 4, 2021
bfb9410
test_dto_f01
ThorbenLaprell Oct 4, 2021
c353c4c
test_dto_f02
ThorbenLaprell Oct 4, 2021
fb3a1d7
test_dto_f04
ThorbenLaprell Oct 4, 2021
28016cc
test_dto_f05
ThorbenLaprell Oct 4, 2021
3632f0d
test_dto_f7
ThorbenLaprell Oct 4, 2021
8f27118
test_start_time01
ThorbenLaprell Oct 5, 2021
a1b96f8
test_time02
ThorbenLaprell Oct 5, 2021
0039cfa
test_time03
ThorbenLaprell Oct 5, 2021
f4794b4
test_time04
ThorbenLaprell Oct 5, 2021
7650e62
test_time05
ThorbenLaprell Oct 5, 2021
ae97a25
test_time06
ThorbenLaprell Oct 5, 2021
197c1c9
test_preview_click_count
ThorbenLaprell Oct 5, 2021
1026985
test_preview_activity01
ThorbenLaprell Oct 5, 2021
79a2116
test_activities01
ThorbenLaprell Oct 5, 2021
3d80a40
test_localization
ThorbenLaprell Oct 5, 2021
a6760a6
test_localization
ThorbenLaprell Oct 5, 2021
0892f8d
test_preview_query_users01
ThorbenLaprell Oct 6, 2021
cb0363e
test_preview_query_users02
ThorbenLaprell Oct 6, 2021
1d86354
test_preview_query_users03
ThorbenLaprell Oct 6, 2021
46c1b77
test_preview_query_users05
ThorbenLaprell Oct 6, 2021
fa97a00
fake_use
ThorbenLaprell Oct 6, 2021
f419ecc
debug_quiz_test01
ThorbenLaprell Oct 10, 2021
41eae52
test_quiz02
ThorbenLaprell Oct 10, 2021
d2db8bf
debug_quiz03
ThorbenLaprell Oct 10, 2021
4c22411
debug_quiz06
ThorbenLaprell Oct 11, 2021
8b0bc3e
debug_quiz07
ThorbenLaprell Oct 11, 2021
c0e151d
debug_quiz08
ThorbenLaprell Oct 11, 2021
e20403f
debug_quiz09
ThorbenLaprell Oct 11, 2021
46a8d0f
debug_quiz10
ThorbenLaprell Oct 11, 2021
cdc523e
debug_quiz11
ThorbenLaprell Oct 11, 2021
549c591
debug_quiz13
ThorbenLaprell Oct 11, 2021
eb13bc3
debug_quiz14
ThorbenLaprell Oct 12, 2021
21c489d
debug_quiz15
ThorbenLaprell Oct 12, 2021
9db020e
debug_quiz16
ThorbenLaprell Oct 12, 2021
ddf5b20
debug_quiz17
ThorbenLaprell Oct 12, 2021
b9801f3
debug_quiz18
ThorbenLaprell Oct 12, 2021
2803f42
debug_quiz19
ThorbenLaprell Oct 12, 2021
8425d8f
debug_quiz20
ThorbenLaprell Oct 12, 2021
18cdd89
debug_quiz21
ThorbenLaprell Oct 12, 2021
59f4dc1
debug_quiz22
ThorbenLaprell Oct 12, 2021
f759cce
debug_quiz23
ThorbenLaprell Oct 12, 2021
3d50edd
debug_quiz24
ThorbenLaprell Oct 12, 2021
41fe5cf
debug_quiz25
ThorbenLaprell Oct 12, 2021
2dd1f83
debug_quiz26
ThorbenLaprell Oct 12, 2021
6a2c112
debug_quiz27
ThorbenLaprell Oct 12, 2021
e12738c
phpunit_release02
ThorbenLaprell Oct 12, 2021
a162d27
show
ThorbenLaprell Oct 12, 2021
85884a8
test_resease
ThorbenLaprell Oct 12, 2021
6a89383
test_release02
ThorbenLaprell Oct 12, 2021
2fda4f1
test_release03
ThorbenLaprell Oct 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test_preview_query_users01
ThorbenLaprell committed Oct 6, 2021
commit 0892f8d2e226c98802edfdbd9b5c713cbf055f39
30 changes: 30 additions & 0 deletions reports/learners/tests/query_helper_advanced_test.php
Original file line number Diff line number Diff line change
@@ -148,4 +148,34 @@ public function test_localization() {

$this->assertEquals(13, $testresult1["en"]->users);
}

public function test_preview_query_users() {

global $DB, $PAGE;
$this->resetAfterTest(true);
$this->setAdminUser();

$datagenerator = $this->getDataGenerator();

$category = $datagenerator->create_category();
$course = $datagenerator->create_course(array('name'=>'testcourse', 'category'=>$category->id));
$courseid = $course->id;
$type = 'lang';
for($i=0; $i<13; $i++) {
$user = $datagenerator->create_user();
$datagenerator->enrol_user($user->id, $course->id, 'student');
}

$date = new \DateTime();
$date->modify('-1 week');

$timestamp = $date->getTimestamp() - 84000;


$testresult1 = query_helper::preview_query_users($courseid);
var_dump($testresult1);

$this->assertEquals(13, $testresult1["1"]->learners);

}
}