19 declare(strict_types=1);
    21 require_once(
"libs/composer/vendor/autoload.php");
    22 require_once(__DIR__ . 
"/../../Base.php");
    42         $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Counter\\Factory", 
$f);
    44         $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Counter\\Counter", 
$f->status(0));
    45         $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Counter\\Counter", 
$f->novelty(0));
    55         $c = 
$f->status($number);
    57         $this->assertNotNull(
$c);
    58         $this->assertEquals(
C\
Counter\Counter::STATUS, 
$c->getType());
    59         $this->assertEquals($number, 
$c->getNumber());
    69         $c = 
$f->novelty($number);
    71         $this->assertNotNull(
$c);
    72         $this->assertEquals(
C\
Counter\Counter::NOVELTY, 
$c->getType());
    73         $this->assertEquals($number, 
$c->getNumber());
    78         $this->expectException(InvalidArgumentException::class);
    87         $this->expectException(TypeError::class);
    89         $f->status($no_number);
   113         "status" => 
"badge badge-notify il-counter-status",
   114         "novelty" => 
"badge badge-notify il-counter-novelty"   124         $c = 
$f->$type($number);
   128         $css_classes = self::$canonical_css_classes[$type];
   129         $expected = 
"<span class=\"il-counter\"><span class=\"$css_classes\">$number</span></span>";
 getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
static array $canonical_css_classes
 
testRenderStatus(string $type, int $number)
getCounterTypeAndNumberProvider 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
testNoveltyCounter(int $number)
getNumberProvider 
 
assertHTMLEquals(string $expected_html_as_string, string $html_as_string)
 
testImplementsFactoryInterface()
 
Provides common functionality for UI tests. 
 
testIntNumbersOnly($no_number)
getNoNumberProvider 
 
Defines tests that a counter implementation should pass. 
 
normalizeHTML(string $html)
 
testStatusCounter(int $number)
getNumberProvider 
 
getCounterTypeAndNumberProvider()