@@ -55,6 +55,7 @@ public function test_create_section(): void {
5555 $ this ->setCurrentTimeStart ();
5656 $ section = $ generator ->create_section ();
5757 $ this ->assertSame ('Section 1 ' , $ section ->name );
58+ $ this ->assertSame ('Description of section Section 1 ' , $ section ->shortdescription );
5859 $ this ->assertSame ((string )$ syscontext ->id , $ section ->contextid );
5960 $ this ->assertSame (null , $ section ->frontpagepriority );
6061 $ this ->assertSame ((string )util::STATUS_ACTIVE , $ section ->status );
@@ -70,6 +71,7 @@ public function test_create_section(): void {
7071
7172 $ section = $ generator ->create_section ([
7273 'name ' => 'Some section ' ,
74+ 'shortdescription ' => 'Some desc ' ,
7375 'contextid ' => $ categorycontext ->id ,
7476 'frontpagepriority ' => '777 ' ,
7577 'status ' => util::STATUS_DRAFT ,
@@ -78,6 +80,7 @@ public function test_create_section(): void {
7880 'cohortvisible ' => [$ cohort1 ->id , $ cohort2 ->id ],
7981 ]);
8082 $ this ->assertSame ('Some section ' , $ section ->name );
83+ $ this ->assertSame ('Some desc ' , $ section ->shortdescription );
8184 $ this ->assertSame ('777 ' , $ section ->frontpagepriority );
8285 $ this ->assertSame ((string )util::STATUS_DRAFT , $ section ->status );
8386 $ this ->assertSame ('1 ' , $ section ->guestvisible );
@@ -183,6 +186,7 @@ public function test_create_collection(): void {
183186 $ this ->setCurrentTimeStart ();
184187 $ collection = $ generator ->create_collection ();
185188 $ this ->assertSame ('Collection 1 ' , $ collection ->name );
189+ $ this ->assertSame ('Description of collection Collection 1 ' , $ collection ->shortdescription );
186190 $ this ->assertSame ((string )$ syscontext ->id , $ collection ->contextid );
187191 $ this ->assertSame (null , $ collection ->frontpagepriority );
188192 $ this ->assertSame ('0 ' , $ collection ->guestvisible );
@@ -197,13 +201,15 @@ public function test_create_collection(): void {
197201
198202 $ collection = $ generator ->create_collection ([
199203 'name ' => 'Some collection ' ,
204+ 'shortdescription ' => 'Some desc ' ,
200205 'contextid ' => $ categorycontext ->id ,
201206 'frontpagepriority ' => '777 ' ,
202207 'guestvisible ' => 1 ,
203208 'uservisible ' => 0 ,
204209 'cohortvisible ' => [$ cohort1 ->id , $ cohort2 ->id ],
205210 ]);
206211 $ this ->assertSame ('Some collection ' , $ collection ->name );
212+ $ this ->assertSame ('Some desc ' , $ collection ->shortdescription );
207213 $ this ->assertSame ('777 ' , $ collection ->frontpagepriority );
208214 $ this ->assertSame ('1 ' , $ collection ->guestvisible );
209215 $ this ->assertSame ('0 ' , $ collection ->uservisible );
0 commit comments