ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
GlyphTest Class Reference

Test on glyph implementation. More...

+ Inheritance diagram for GlyphTest:
+ Collaboration diagram for GlyphTest:

Public Member Functions

 getGlyphFactory ()
 
 getCounterFactory ()
 
 testImplementsFactoryInterface (string $factory_method)
 getGlyphTypeProvider More...
 
 testGlyphTypes (string $factory_method)
 getGlyphTypeProvider More...
 
 testGlyphAction (string $factory_method)
 getGlyphTypeProvider More...
 
 testGlyphNoAction (string $factory_method)
 getGlyphTypeProvider More...
 
 testWithUnavailableAction (string $factory_method)
 getGlyphTypeProvider More...
 
 testWithHighlight ()
 
 testNoCounter (string $factory_method)
 getGlyphTypeProvider More...
 
 testOneCounter (string $counter_type)
 getCounterTypeProvider More...
 
 testTwoCounters ()
 
 testOnlyTwoCounters ()
 
 testImmutabilityWithCounter ()
 
 testKnownGlyphsOnly ()
 
 getGlyphTypeProvider ()
 
 getCounterTypeProvider ()
 
 testRenderSimple (string $type)
 getGlyphTypeProvider More...
 
 testRenderWithUnavailableAction (string $type)
 getGlyphTypeProvider More...
 
 testRenderWithCounter (string $type)
 getCounterTypeProvider More...
 
 testRenderWithTwoCounters ()
 
 testDontRenderCounter ()
 
 testRenderWithOnLoadCode (string $type)
 getGlyphTypeProvider More...
 
 testRenderWithAction (string $type)
 getGlyphTypeProvider More...
 
 testIsTabbable ()
 
 testTabbableGlyphRender ()
 
- Public Member Functions inherited from ILIAS_UI_TestBase
 setUp ()
 
 tearDown ()
 
 getUIFactory ()
 
 getTemplateFactory ()
 
 getResourceRegistry ()
 
 getLanguage ()
 
 getJavaScriptBinding ()
 
 getRefinery ()
 
 getImagePathResolver ()
 
 getDataFactory ()
 
 getHelpTextRetriever ()
 
 getUploadLimitResolver ()
 
 getDefaultRenderer (JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
 getDecoratedRenderer (Renderer $default)
 
 normalizeHTML (string $html)
 
 assertHTMLEquals (string $expected_html_as_string, string $html_as_string)
 

Static Public Attributes

static array $canonical_css_classes
 
static array $aria_labels
 

Additional Inherited Members

- Protected Member Functions inherited from ILIAS_UI_TestBase
 brutallyTrimHTML (string $html)
 A more radical version of normalizeHTML. More...
 
 brutallyTrimSignals (string $html)
 A naive replacement of all il_signal-ids with dots to ease comparisons of rendered output. More...
 

Detailed Description

Test on glyph implementation.

Definition at line 35 of file GlyphTest.php.

Member Function Documentation

◆ getCounterFactory()

GlyphTest::getCounterFactory ( )

Definition at line 42 of file GlyphTest.php.

Referenced by testDontRenderCounter(), testImmutabilityWithCounter(), testOneCounter(), testOnlyTwoCounters(), testRenderWithCounter(), testRenderWithTwoCounters(), and testTwoCounters().

42  : C\Factory
43  {
44  return new I\Counter\Factory();
45  }
+ Here is the caller graph for this function:

◆ getCounterTypeProvider()

GlyphTest::getCounterTypeProvider ( )

Definition at line 343 of file GlyphTest.php.

343  : array
344  {
345  return [
346  ["status"],
347  ["novelty"]
348  ];
349  }

◆ getGlyphFactory()

◆ getGlyphTypeProvider()

GlyphTest::getGlyphTypeProvider ( )

Definition at line 334 of file GlyphTest.php.

334  : array
335  {
336  $glyph_reflection = new ReflectionClass(G\Glyph::class);
337  $constant_values = array_values($glyph_reflection->getConstants());
338  return array_map(function ($val) {
339  return [$val];
340  }, $constant_values);
341  }

◆ testDontRenderCounter()

GlyphTest::testDontRenderCounter ( )

Definition at line 436 of file GlyphTest.php.

References Vendor\Package\$f, $r, getCounterFactory(), ILIAS_UI_TestBase\getDefaultRenderer(), ILIAS_UI_TestBase\getJavaScriptBinding(), ILIAS_UI_TestBase\getLanguage(), ILIAS_UI_TestBase\getRefinery(), ILIAS_UI_TestBase\getTemplateFactory(), ILIAS_UI_TestBase\getUIFactory(), and ILIAS_UI_TestBase\getUploadLimitResolver().

436  : void
437  {
438  $this->expectException(LogicException::class);
439  $r = new Renderer(
440  $this->getUIFactory(),
441  $this->getTemplateFactory(),
442  $this->getLanguage(),
443  $this->getJavaScriptBinding(),
444  $this->getRefinery(),
445  new ilImagePathResolver(),
446  $this->createMock(DataFactory::class),
447  $this->createMock(HelpTextRetriever::class),
448  $this->getUploadLimitResolver()
449  );
450  $f = $this->getCounterFactory();
451 
452  $r->render($f->status(0), $this->getDefaultRenderer());
453  }
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
Definition: Base.php:377
getJavaScriptBinding()
Definition: Base.php:342
getUploadLimitResolver()
Definition: Base.php:372
getCounterFactory()
Definition: GlyphTest.php:42
getTemplateFactory()
Definition: Base.php:327
$r
+ Here is the call graph for this function:

◆ testGlyphAction()

GlyphTest::testGlyphAction ( string  $factory_method)

getGlyphTypeProvider

Definition at line 181 of file GlyphTest.php.

References Vendor\Package\$f, and getGlyphFactory().

181  : void
182  {
183  $f = $this->getGlyphFactory();
184  $g = $f->$factory_method("http://www.ilias.de");
185 
186  $this->assertNotNull($g);
187  $this->assertEquals("http://www.ilias.de", $g->getAction());
188  }
getGlyphFactory()
Definition: GlyphTest.php:37
+ Here is the call graph for this function:

◆ testGlyphNoAction()

GlyphTest::testGlyphNoAction ( string  $factory_method)

getGlyphTypeProvider

Definition at line 193 of file GlyphTest.php.

References Vendor\Package\$f, and getGlyphFactory().

193  : void
194  {
195  $f = $this->getGlyphFactory();
196  $g = $f->$factory_method();
197 
198  $this->assertNotNull($g);
199  $this->assertEquals(null, $g->getAction());
200  }
getGlyphFactory()
Definition: GlyphTest.php:37
+ Here is the call graph for this function:

◆ testGlyphTypes()

GlyphTest::testGlyphTypes ( string  $factory_method)

getGlyphTypeProvider

Definition at line 169 of file GlyphTest.php.

References Vendor\Package\$f, and getGlyphFactory().

169  : void
170  {
171  $f = $this->getGlyphFactory();
172  $g = $f->$factory_method();
173 
174  $this->assertNotNull($g);
175  $this->assertEquals($factory_method, $g->getType());
176  }
getGlyphFactory()
Definition: GlyphTest.php:37
+ Here is the call graph for this function:

◆ testImmutabilityWithCounter()

GlyphTest::testImmutabilityWithCounter ( )

Definition at line 313 of file GlyphTest.php.

References getCounterFactory(), and getGlyphFactory().

313  : void
314  {
315  $gf = $this->getGlyphFactory();
316  $cf = $this->getCounterFactory();
317 
318  $g = $gf->mail();
319  $g
320  ->withCounter(
321  $cf->novelty(0)
322  );
323 
324  $counters = $g->getCounters();
325  $this->assertCount(0, $counters);
326  }
getCounterFactory()
Definition: GlyphTest.php:42
getGlyphFactory()
Definition: GlyphTest.php:37
+ Here is the call graph for this function:

◆ testImplementsFactoryInterface()

GlyphTest::testImplementsFactoryInterface ( string  $factory_method)

getGlyphTypeProvider

Definition at line 158 of file GlyphTest.php.

References Vendor\Package\$f, and getGlyphFactory().

158  : void
159  {
160  $f = $this->getGlyphFactory();
161 
162  $this->assertInstanceOf("ILIAS\\UI\\Component\\Symbol\\Glyph\\Factory", $f);
163  $this->assertInstanceOf("ILIAS\\UI\\Component\\Symbol\\Glyph\\Glyph", $f->$factory_method("http://www.ilias.de"));
164  }
getGlyphFactory()
Definition: GlyphTest.php:37
+ Here is the call graph for this function:

◆ testIsTabbable()

GlyphTest::testIsTabbable ( )

Definition at line 500 of file GlyphTest.php.

References Vendor\Package\$c, Vendor\Package\$f, $r, ILIAS_UI_TestBase\getDefaultRenderer(), and getGlyphFactory().

500  : void
501  {
502  $f = $this->getGlyphFactory();
503  $r = $this->getDefaultRenderer();
504 
505  // Glyph without Action or Signal
506  $c = $f->user();
507  $this->assertFalse($c->isTabbable());
508 
509  // Glyph with Action
510  $c = $f->user()->withAction("#");
511  $this->assertTrue($c->isTabbable());
512 
513  // Glyph with Signal
514  $c = $f->user()->withOnClick(new I\Signal("id_1", "click"));
515  $this->assertTrue($c->isTabbable());
516 
517  // Glyph with Action and Signal
518  $c = $f->user()->withAction("#")->withOnClick(new I\Signal("id_1", "click"));
519  $this->assertTrue($c->isTabbable());
520 
521  // Glyph with Action and Signal but Inactive
522  $c = $f->user()->withAction("#")->withOnClick(new I\Signal("id_1", "click"))->withUnavailableAction();
523  $this->assertFalse($c->isTabbable());
524  }
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
Definition: Base.php:377
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getGlyphFactory()
Definition: GlyphTest.php:37
$r
+ Here is the call graph for this function:

◆ testKnownGlyphsOnly()

GlyphTest::testKnownGlyphsOnly ( )

Definition at line 328 of file GlyphTest.php.

328  : void
329  {
330  $this->expectException(InvalidArgumentException::class);
331  new Glyph("FOO", "http://www.ilias.de");
332  }

◆ testNoCounter()

GlyphTest::testNoCounter ( string  $factory_method)

getGlyphTypeProvider

Definition at line 229 of file GlyphTest.php.

References Vendor\Package\$f, and getGlyphFactory().

229  : void
230  {
231  $f = $this->getGlyphFactory();
232  $g = $f->$factory_method();
233 
234  $this->assertCount(0, $g->getCounters());
235  }
getGlyphFactory()
Definition: GlyphTest.php:37
+ Here is the call graph for this function:

◆ testOneCounter()

GlyphTest::testOneCounter ( string  $counter_type)

getCounterTypeProvider

Definition at line 240 of file GlyphTest.php.

References Vendor\Package\$c, getCounterFactory(), and getGlyphFactory().

240  : void
241  {
242  $gf = $this->getGlyphFactory();
243  $cf = $this->getCounterFactory();
244  $number = 1;
245 
246  $g = $gf
247  ->mail()
248  ->withCounter(
249  $cf->$counter_type($number)
250  );
251 
252  $counters = $g->getCounters();
253  $this->assertCount(1, $counters);
254  $c = $counters[0];
255  $this->assertEquals($counter_type, $c->getType());
256  $this->assertEquals($number, $c->getNumber());
257  }
getCounterFactory()
Definition: GlyphTest.php:42
getGlyphFactory()
Definition: GlyphTest.php:37
+ Here is the call graph for this function:

◆ testOnlyTwoCounters()

GlyphTest::testOnlyTwoCounters ( )

Definition at line 284 of file GlyphTest.php.

References Vendor\Package\$c, getCounterFactory(), and getGlyphFactory().

284  : void
285  {
286  $gf = $this->getGlyphFactory();
287  $cf = $this->getCounterFactory();
288  $number_s = 1;
289  $number_n1 = 2;
290  $number_n2 = 2;
291 
292  $g = $gf
293  ->mail()
294  ->withCounter(
295  $cf->status($number_s)
296  )
297  ->withCounter(
298  $cf->novelty($number_n1)
299  )
300  ->withCounter(
301  $cf->novelty($number_n2)
302  );
303 
304  $counters = $g->getCounters();
305  $this->assertCount(2, $counters);
306  $vals = array_map(function ($c) {
307  return array($c->getType(), $c->getNumber());
308  }, $counters);
309  $this->assertContains(array("status", $number_s), $vals);
310  $this->assertContains(array("novelty", $number_n2), $vals);
311  }
getCounterFactory()
Definition: GlyphTest.php:42
getGlyphFactory()
Definition: GlyphTest.php:37
+ Here is the call graph for this function:

◆ testRenderSimple()

GlyphTest::testRenderSimple ( string  $type)

getGlyphTypeProvider

Definition at line 354 of file GlyphTest.php.

References Vendor\Package\$c, Vendor\Package\$f, $r, ILIAS_UI_TestBase\getDefaultRenderer(), getGlyphFactory(), and ILIAS_UI_TestBase\normalizeHTML().

354  : void
355  {
356  $f = $this->getGlyphFactory();
357  $r = $this->getDefaultRenderer();
358  $c = $f->$type("http://www.ilias.de");
359 
360  $html = $this->normalizeHTML($r->render($c));
361 
362  $css_classes = self::$canonical_css_classes[$type];
363  $aria_label = self::$aria_labels[$type];
364 
365  $expected = '<a tabindex="0" class="glyph" href="http://www.ilias.de" aria-label="' . $aria_label . '"><span class="' . $css_classes . '" aria-hidden="true"></span></a>';
366  $this->assertEquals($expected, $html);
367  }
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
Definition: Base.php:377
normalizeHTML(string $html)
Definition: Base.php:453
getGlyphFactory()
Definition: GlyphTest.php:37
$r
+ Here is the call graph for this function:

◆ testRenderWithAction()

GlyphTest::testRenderWithAction ( string  $type)

getGlyphTypeProvider

Definition at line 484 of file GlyphTest.php.

References Vendor\Package\$c, Vendor\Package\$f, $r, ILIAS_UI_TestBase\getDefaultRenderer(), getGlyphFactory(), and ILIAS_UI_TestBase\normalizeHTML().

484  : void
485  {
486  $f = $this->getGlyphFactory();
487  $r = $this->getDefaultRenderer();
488  $c = $f->$type("http://www.ilias.de");
489  $c = $c->withAction("http://www.ilias.de/open-source-lms-ilias/");
490 
491  $html = $this->normalizeHTML($r->render($c));
492 
493  $css_classes = self::$canonical_css_classes[$type];
494  $aria_label = self::$aria_labels[$type];
495 
496  $expected = "<a tabindex=\"0\" class=\"glyph\" href=\"http://www.ilias.de/open-source-lms-ilias/\" aria-label=\"$aria_label\"><span class=\"$css_classes\" aria-hidden=\"true\"></span></a>";
497  $this->assertEquals($expected, $html);
498  }
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
Definition: Base.php:377
normalizeHTML(string $html)
Definition: Base.php:453
getGlyphFactory()
Definition: GlyphTest.php:37
$r
+ Here is the call graph for this function:

◆ testRenderWithCounter()

GlyphTest::testRenderWithCounter ( string  $type)

getCounterTypeProvider

Definition at line 393 of file GlyphTest.php.

References Vendor\Package\$c, $r, ILIAS_UI_TestBase\assertHTMLEquals(), getCounterFactory(), ILIAS_UI_TestBase\getDefaultRenderer(), getGlyphFactory(), ILIAS\UI\Component\Symbol\Glyph\Glyph\MAIL, and ILIAS_UI_TestBase\normalizeHTML().

393  : void
394  {
395  $fg = $this->getGlyphFactory();
396  $fc = $this->getCounterFactory();
397  $r = $this->getDefaultRenderer();
398  $c = $fg->mail("http://www.ilias.de")->withCounter($fc->$type(42));
399 
400  $html = $this->normalizeHTML($r->render($c));
401 
402  $css_classes = self::$canonical_css_classes[G\Glyph::MAIL];
403  $aria_label = self::$aria_labels[G\Glyph::MAIL];
404 
405  $expected = '
406  <a tabindex="0" class="glyph" href="http://www.ilias.de" aria-label="' . $aria_label . '">
407  <span class="' . $css_classes . '" aria-hidden="true"></span>
408  <span class="il-counter"><span class="badge badge-notify il-counter-' . $type . '">42</span></span>
409  <span class="il-counter-spacer">42</span>
410  </a>';
411  $this->assertHTMLEquals($expected, $html);
412  }
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
Definition: Base.php:377
assertHTMLEquals(string $expected_html_as_string, string $html_as_string)
Definition: Base.php:458
getCounterFactory()
Definition: GlyphTest.php:42
normalizeHTML(string $html)
Definition: Base.php:453
getGlyphFactory()
Definition: GlyphTest.php:37
$r
+ Here is the call graph for this function:

◆ testRenderWithOnLoadCode()

GlyphTest::testRenderWithOnLoadCode ( string  $type)

getGlyphTypeProvider

Definition at line 458 of file GlyphTest.php.

References Vendor\Package\$c, Vendor\Package\$f, $id, $r, ILIAS_UI_TestBase\getDefaultRenderer(), getGlyphFactory(), and ILIAS_UI_TestBase\normalizeHTML().

458  : void
459  {
460  $f = $this->getGlyphFactory();
461  $r = $this->getDefaultRenderer();
462  $ids = array();
463  $c = $f->$type("http://www.ilias.de")
464  ->withOnLoadCode(function ($id) use (&$ids): string {
465  $ids[] = $id;
466  return "";
467  });
468 
469  $html = $this->normalizeHTML($r->render($c));
470 
471  $this->assertCount(1, $ids);
472 
473  $css_classes = self::$canonical_css_classes[$type];
474  $aria_label = self::$aria_labels[$type];
475 
476  $id = $ids[0];
477  $expected = "<a tabindex=\"0\" class=\"glyph\" href=\"http://www.ilias.de\" aria-label=\"$aria_label\" id=\"$id\"><span class=\"$css_classes\" aria-hidden=\"true\"></span></a>";
478  $this->assertEquals($expected, $html);
479  }
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
Definition: Base.php:377
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
normalizeHTML(string $html)
Definition: Base.php:453
getGlyphFactory()
Definition: GlyphTest.php:37
$r
+ Here is the call graph for this function:

◆ testRenderWithTwoCounters()

GlyphTest::testRenderWithTwoCounters ( )

Definition at line 414 of file GlyphTest.php.

References Vendor\Package\$c, $r, ILIAS_UI_TestBase\assertHTMLEquals(), getCounterFactory(), ILIAS_UI_TestBase\getDefaultRenderer(), getGlyphFactory(), ILIAS\UI\Component\Symbol\Glyph\Glyph\MAIL, and ILIAS_UI_TestBase\normalizeHTML().

414  : void
415  {
416  $fg = $this->getGlyphFactory();
417  $fc = $this->getCounterFactory();
418  $r = $this->getDefaultRenderer();
419  $c = $fg->mail("http://www.ilias.de")
420  ->withCounter($fc->novelty(42))
421  ->withCounter($fc->status(7));
422 
423  $html = $this->normalizeHTML($r->render($c));
424 
425  $css_classes = self::$canonical_css_classes[G\Glyph::MAIL];
426  $aria_label = self::$aria_labels[G\Glyph::MAIL];
427  $expected = "<a tabindex=\"0\" class=\"glyph\" href=\"http://www.ilias.de\" aria-label=\"$aria_label\">" .
428  "<span class=\"$css_classes\" aria-hidden=\"true\"></span>" .
429  "<span class=\"il-counter\"><span class=\"badge badge-notify il-counter-status\">7</span></span>" .
430  "<span class=\"il-counter\"><span class=\"badge badge-notify il-counter-novelty\">42</span></span>" .
431  "<span class=\"il-counter-spacer\">42</span>" .
432  "</a>";
433  $this->assertHTMLEquals($expected, $html);
434  }
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
Definition: Base.php:377
assertHTMLEquals(string $expected_html_as_string, string $html_as_string)
Definition: Base.php:458
getCounterFactory()
Definition: GlyphTest.php:42
normalizeHTML(string $html)
Definition: Base.php:453
getGlyphFactory()
Definition: GlyphTest.php:37
$r
+ Here is the call graph for this function:

◆ testRenderWithUnavailableAction()

GlyphTest::testRenderWithUnavailableAction ( string  $type)

getGlyphTypeProvider

Definition at line 372 of file GlyphTest.php.

References Vendor\Package\$c, Vendor\Package\$f, $r, ILIAS_UI_TestBase\brutallyTrimHTML(), ILIAS_UI_TestBase\getDefaultRenderer(), getGlyphFactory(), and ILIAS_UI_TestBase\normalizeHTML().

372  : void
373  {
374  $f = $this->getGlyphFactory();
375  $r = $this->getDefaultRenderer();
376  $c = $f->$type("http://www.ilias.de")->withUnavailableAction();
377 
378  $html = $this->normalizeHTML($r->render($c));
379 
380  $css_classes = self::$canonical_css_classes[$type];
381  $aria_label = self::$aria_labels[$type];
382 
383  $expected = '
384  <a class="glyph disabled" aria-label="' . $aria_label . '" aria-disabled="true">
385  <span class="' . $css_classes . '" aria-hidden="true"></span>
386  </a>';
387  $this->assertEquals($this->brutallyTrimHTML($expected), $this->brutallyTrimHTML($html));
388  }
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
Definition: Base.php:377
brutallyTrimHTML(string $html)
A more radical version of normalizeHTML.
Definition: Base.php:475
normalizeHTML(string $html)
Definition: Base.php:453
getGlyphFactory()
Definition: GlyphTest.php:37
$r
+ Here is the call graph for this function:

◆ testTabbableGlyphRender()

GlyphTest::testTabbableGlyphRender ( )

Definition at line 526 of file GlyphTest.php.

References Vendor\Package\$c, Vendor\Package\$f, $r, ILIAS_UI_TestBase\getDefaultRenderer(), getGlyphFactory(), and ILIAS_UI_TestBase\normalizeHTML().

526  : void
527  {
528  $f = $this->getGlyphFactory();
529  $r = $this->getDefaultRenderer();
530 
531  // Glyph without Action or Signal (not Tabbable)
532  $c = $f->user();
533  $expected = '<a class="glyph" aria-label="show_who_is_online"><span class="glyphicon glyphicon-user" aria-hidden="true"></span></a>';
534  $html = $this->normalizeHTML($r->render($c));
535  $this->assertEquals($expected, $html);
536 
537  // Glyph with Action (Tabbable)
538  $c = $f->user()->withAction("#");
539  $expected = '<a tabindex="0" class="glyph" href="#" aria-label="show_who_is_online"><span class="glyphicon glyphicon-user" aria-hidden="true"></span></a>';
540  $html = $this->normalizeHTML($r->render($c));
541  $this->assertEquals($expected, $html);
542  }
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
Definition: Base.php:377
normalizeHTML(string $html)
Definition: Base.php:453
getGlyphFactory()
Definition: GlyphTest.php:37
$r
+ Here is the call graph for this function:

◆ testTwoCounters()

GlyphTest::testTwoCounters ( )

Definition at line 259 of file GlyphTest.php.

References Vendor\Package\$c, getCounterFactory(), and getGlyphFactory().

259  : void
260  {
261  $gf = $this->getGlyphFactory();
262  $cf = $this->getCounterFactory();
263  $number_s = 1;
264  $number_n = 2;
265 
266  $g = $gf
267  ->mail()
268  ->withCounter(
269  $cf->status($number_s)
270  )
271  ->withCounter(
272  $cf->novelty($number_n)
273  );
274 
275  $counters = $g->getCounters();
276  $this->assertCount(2, $counters);
277  $vals = array_map(function ($c) {
278  return array($c->getType(), $c->getNumber());
279  }, $counters);
280  $this->assertContains(array("status", $number_s), $vals);
281  $this->assertContains(array("novelty", $number_n), $vals);
282  }
getCounterFactory()
Definition: GlyphTest.php:42
getGlyphFactory()
Definition: GlyphTest.php:37
+ Here is the call graph for this function:

◆ testWithHighlight()

GlyphTest::testWithHighlight ( )

Definition at line 215 of file GlyphTest.php.

References getGlyphFactory().

215  : void
216  {
217  $gf = $this->getGlyphFactory();
218 
219  $g = $gf->mail();
220  $g2 = $g->withHighlight();
221 
222  $this->assertFalse($g->isHighlighted());
223  $this->assertTrue($g2->isHighlighted());
224  }
getGlyphFactory()
Definition: GlyphTest.php:37
+ Here is the call graph for this function:

◆ testWithUnavailableAction()

GlyphTest::testWithUnavailableAction ( string  $factory_method)

getGlyphTypeProvider

Definition at line 205 of file GlyphTest.php.

References Vendor\Package\$f, and getGlyphFactory().

205  : void
206  {
207  $f = $this->getGlyphFactory();
208  $g = $f->$factory_method();
209  $g2 = $f->$factory_method()->withUnavailableAction();
210 
211  $this->assertTrue($g->isActive());
212  $this->assertFalse($g2->isActive());
213  }
getGlyphFactory()
Definition: GlyphTest.php:37
+ Here is the call graph for this function:

Field Documentation

◆ $aria_labels

array GlyphTest::$aria_labels
static

Definition at line 101 of file GlyphTest.php.

◆ $canonical_css_classes

array GlyphTest::$canonical_css_classes
static

Definition at line 47 of file GlyphTest.php.


The documentation for this class was generated from the following file: