◆ buildButtonFactory()
  
  
      
        
          | MarkdownTest::buildButtonFactory  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
 
◆ buildMinimalFieldFactory()
  
  
      
        
          | MarkdownTest::buildMinimalFieldFactory  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 480 of file MarkdownTest.php.
References getLanguage().
Referenced by setUp().
  482         return new FieldFactory(
   483             $this->createMock(UploadLimitResolver::class),
   485             $this->createMock(DataFactory::class),
   486             $this->createMock(Refinery::class),
 
 
 
 
◆ getGlyphStub()
  
  
      
        
          | MarkdownTest::getGlyphStub  | 
          ( | 
          string  | 
          $name | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 542 of file MarkdownTest.php.
Referenced by setUp().
  544         $glyph = $this->createMock(Glyph::class);
   545         $glyph->method(
'getCanonicalName')->willReturn($name);
   547         $glyph->method(
'withUnavailableAction')->willReturnSelf();
 
 
 
 
◆ getMarkdownRendererMock()
  
  
      
        
          | MarkdownTest::getMarkdownRendererMock  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
 
◆ getRendererWithStubs()
  
  
      
        
          | MarkdownTest::getRendererWithStubs  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 467 of file MarkdownTest.php.
Referenced by testRender(), testRenderWithByline(), testRenderWithDisabled(), testRenderWithError(), testRenderWithLimits(), and testRenderWithRequired().
  469         return $this->getDefaultRenderer(null, [
   470             $this->view_control_mock,
   471             $this->header_glyph_mock,
   472             $this->italic_glyph_mock,
   473             $this->bold_glyph_mock,
   474             $this->link_glyph_mock,
   475             $this->numberedlist_glyph_mock,
   476             $this->bulledpoint_glyph_mock,
 
 
 
 
◆ getSymbolFactoryMock()
  
  
      
        
          | MarkdownTest::getSymbolFactoryMock  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 510 of file MarkdownTest.php.
Referenced by getUIFactory().
  512         $glyph_factory = $this->createMock(GlyphFactory::class);
   513         $glyph_factory->method(
'header')->willReturn($this->header_glyph_mock);
   514         $glyph_factory->method(
'italic')->willReturn($this->italic_glyph_mock);
   515         $glyph_factory->method(
'bold')->willReturn($this->bold_glyph_mock);
   516         $glyph_factory->method(
'link')->willReturn($this->link_glyph_mock);
   517         $glyph_factory->method(
'numberedlist')->willReturn($this->numberedlist_glyph_mock);
   518         $glyph_factory->method(
'bulletlist')->willReturn($this->bulledpoint_glyph_mock);
   520         $symbol_factory = $this->createMock(SymbolFactory::class);
   521         $symbol_factory->method(
'glyph')->willReturn($glyph_factory);
   523         return $symbol_factory;
 
 
 
 
◆ getUIFactory()
      
        
          | MarkdownTest::getUIFactory  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ getViewControlFactoryMock()
  
  
      
        
          | MarkdownTest::getViewControlFactoryMock  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
 
◆ getViewControlModeStub()
  
  
      
        
          | MarkdownTest::getViewControlModeStub  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 534 of file MarkdownTest.php.
Referenced by getViewControlFactoryMock(), and setUp().
  536         $view_control = $this->createMock(ViewControlMode::class);
   537         $view_control->method(
'getCanonicalName')->willReturn(
'view_control_mode');
   539         return $view_control;
  
 
 
◆ setUp()
◆ testRender()
      
        
          | MarkdownTest::testRender  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 124 of file MarkdownTest.php.
References getRendererWithStubs().
  126         $label = 
'test_label';
   128         $input = $this->factory->markdown($this->markdown_renderer, $label)->withNameFrom($this->name_source);
   130         $expected = $this->brutallyTrimHTML(
   132             <fieldset class=\"c-input\" data-il-ui-component=\"markdown-field-input\" data-il-ui-input-name=\"name_0\" id=\"id_8\" tabindex=\"0\">   133                 <label>$label</label>   134                 <div class=\"c-input__field\">   136                     <div class=\"c-field-markdown\">   137                         <div class=\"c-field-markdown__controls\">   139                             <div class=\"c-field-markdown__actions\">   140                                 <span data-action=\"insert-heading\">   141                                     <button class=\"btn btn-default\" data-action=\"#\" id=\"id_2\">header</button>   143                                 <span data-action=\"insert-link\">   144                                     <button class=\"btn btn-default\" data-action=\"#\" id=\"id_3\">link</button>   146                                 <span data-action=\"insert-bold\">   147                                     <button class=\"btn btn-default\" data-action=\"#\" id=\"id_4\">bold</button>   149                                 <span data-action=\"insert-italic\">   150                                     <button class=\"btn btn-default\" data-action=\"#\" id=\"id_5\">italic</button>   152                                 <span data-action=\"insert-bullet-points\">   153                                     <button class=\"btn btn-default\" data-action=\"#\" id=\"id_7\">bulletpoint</button>   155                                 <span data-action=\"insert-enumeration\">   156                                     <button class=\"btn btn-default\" data-action=\"#\" id=\"id_6\">numberedlist</button>   160                              <textarea id=\"id_1\" class=\"c-field-textarea\" name=\"name_0\"></textarea>   161                         <div class=\"c-field-markdown__preview hidden\">   171         $this->assertEquals($expected, $html);
 
 
 
 
◆ testRenderWithByline()
      
        
          | MarkdownTest::testRenderWithByline  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 174 of file MarkdownTest.php.
References getRendererWithStubs().
  176         $label = 
'test_label';
   177         $byline = 
'test_byline';
   179         $input = $this->factory->markdown(
   180             $this->markdown_renderer,
   183         )->withNameFrom($this->name_source);
   185         $expected = $this->brutallyTrimHTML(
   187             <fieldset class=\"c-input\" data-il-ui-component=\"markdown-field-input\" data-il-ui-input-name=\"name_0\" id=\"id_8\" tabindex=\"0\">   188                 <label>$label</label>   189                 <div class=\"c-input__field\">   191                     <div class=\"c-field-markdown\">   192                         <div class=\"c-field-markdown__controls\">   194                             <div class=\"c-field-markdown__actions\">   195                                 <span data-action=\"insert-heading\">   196                                     <button class=\"btn btn-default\" data-action=\"#\" id=\"id_2\">header</button>   198                                 <span data-action=\"insert-link\">   199                                     <button class=\"btn btn-default\" data-action=\"#\" id=\"id_3\">link</button>   201                                 <span data-action=\"insert-bold\">   202                                     <button class=\"btn btn-default\" data-action=\"#\" id=\"id_4\">bold</button>   204                                 <span data-action=\"insert-italic\">   205                                     <button class=\"btn btn-default\" data-action=\"#\" id=\"id_5\">italic</button>   207                                 <span data-action=\"insert-bullet-points\">   208                                     <button class=\"btn btn-default\" data-action=\"#\" id=\"id_7\">bulletpoint</button>   210                                 <span data-action=\"insert-enumeration\">   211                                     <button class=\"btn btn-default\" data-action=\"#\" id=\"id_6\">numberedlist</button>   216                              <textarea id=\"id_1\" class=\"c-field-textarea\" name=\"name_0\"></textarea>   218                         <div class=\"c-field-markdown__preview hidden\">   224                 <div class=\"c-input__help-byline\">$byline</div>   231         $this->assertEquals($expected, $html);
 
 
 
 
◆ testRenderWithDisabled()
      
        
          | MarkdownTest::testRenderWithDisabled  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 294 of file MarkdownTest.php.
References getRendererWithStubs().
  296         $label = 
'test_label';
   297         $byline = 
'test_byline';
   299         $input = $this->factory->markdown(
   300             $this->markdown_renderer,
   303         )->withDisabled(
true)->withNameFrom($this->name_source);
   305         $expected = $this->brutallyTrimHTML(
   307             <fieldset class=\"c-input\" data-il-ui-component=\"markdown-field-input\" data-il-ui-input-name=\"name_0\" disabled=\"disabled\" id=\"id_2\" tabindex=\"0\">   308                 <label>$label</label>   309                 <div class=\"c-input__field\">   311                     <div class=\"c-field-markdown\">   312                         <div class=\"c-field-markdown__controls\">   314                             <div class=\"c-field-markdown__actions\">   315                                 <span data-action=\"insert-heading\">   316                                     <button class=\"btn btn-default\" data-action=\"#\" disabled=\"disabled\">header</button>   318                                 <span data-action=\"insert-link\">   319                                     <button class=\"btn btn-default\" data-action=\"#\" disabled=\"disabled\">link</button>   321                                 <span data-action=\"insert-bold\">   322                                     <button class=\"btn btn-default\" data-action=\"#\" disabled=\"disabled\">bold</button>   324                                 <span data-action=\"insert-italic\">   325                                     <button class=\"btn btn-default\" data-action=\"#\" disabled=\"disabled\">italic</button>   327                                 <span data-action=\"insert-bullet-points\">   328                                     <button class=\"btn btn-default\" data-action=\"#\" disabled=\"disabled\">bulletpoint</button>   330                                 <span data-action=\"insert-enumeration\">   331                                     <button class=\"btn btn-default\" data-action=\"#\" disabled=\"disabled\">numberedlist</button>   335                              <textarea id=\"id_1\" class=\"c-field-textarea\" name=\"name_0\"></textarea>   336                         <div class=\"c-field-markdown__preview hidden\">   341                 <div class=\"c-input__help-byline\">$byline</div>   348         $this->assertEquals($expected, $html);
 
 
 
 
◆ testRenderWithError()
      
        
          | MarkdownTest::testRenderWithError  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 408 of file MarkdownTest.php.
References getRendererWithStubs().
  410         $label = 
'test_label';
   411         $byline = 
'test_byline';
   412         $error = 
'test_error';
   414         $input = $this->factory->markdown(
   415             $this->markdown_renderer,
   418         )->withError($error)->withNameFrom($this->name_source);
   420         $expected = $this->brutallyTrimHTML(
   422             <fieldset class=\"c-input\" data-il-ui-component=\"markdown-field-input\" data-il-ui-input-name=\"name_0\" aria-describedby=\"id_9\" id=\"id_8\" tabindex=\"0\">   423                 <label>$label</label>   424                 <div class=\"c-input__field\">   426                         <div class=\"c-field-markdown\">   427                             <div class=\"c-field-markdown__controls\">   429                                 <div class=\"c-field-markdown__actions\">   430                                     <span data-action=\"insert-heading\">   431                                         <button class=\"btn btn-default\" data-action=\"#\" id=\"id_2\">header</button>   433                                     <span data-action=\"insert-link\">   434                                         <button class=\"btn btn-default\" data-action=\"#\" id=\"id_3\">link</button>   436                                     <span data-action=\"insert-bold\">   437                                         <button class=\"btn btn-default\" data-action=\"#\" id=\"id_4\">bold</button>   439                                     <span data-action=\"insert-italic\">   440                                         <button class=\"btn btn-default\" data-action=\"#\" id=\"id_5\">italic</button>   442                                     <span data-action=\"insert-bullet-points\">   443                                         <button class=\"btn btn-default\" data-action=\"#\" id=\"id_7\">bulletpoint</button>   445                                     <span data-action=\"insert-enumeration\">   446                                         <button class=\"btn btn-default\" data-action=\"#\" id=\"id_6\">numberedlist</button>   450                                  <textarea id=\"id_1\" class=\"c-field-textarea\" name=\"name_0\"></textarea>   451                         <div class=\"c-field-markdown__preview hidden\">   456                 <div class=\"c-input__error-msg alert alert-danger\" id=\"id_9\"><span class=\"sr-only\">ui_error:</span>$error</div>   457                 <div class=\"c-input__help-byline\">$byline</div>   464         $this->assertEquals($expected, $html);
 
 
 
 
◆ testRenderWithLimits()
      
        
          | MarkdownTest::testRenderWithLimits  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 234 of file MarkdownTest.php.
References getRendererWithStubs().
  236         $label = 
'test_label';
   237         $byline = 
'test_byline';
   241         $input = $this->factory->markdown(
   242             $this->markdown_renderer,
   245         )->withMinLimit($min)->withMaxLimit($max)->withNameFrom($this->name_source);
   247         $expected = $this->brutallyTrimHTML(
   249             <fieldset class=\"c-input\" data-il-ui-component=\"markdown-field-input\" data-il-ui-input-name=\"name_0\" id=\"id_8\" tabindex=\"0\">   250                 <label>$label</label>   251                 <div class=\"c-input__field\">   253                     <div class=\"c-field-markdown\">   254                         <div class=\"c-field-markdown__controls\">   256                             <div class=\"c-field-markdown__actions\">   257                                 <span data-action=\"insert-heading\">   258                                     <button class=\"btn btn-default\" data-action=\"#\" id=\"id_2\">header</button>   260                                 <span data-action=\"insert-link\">   261                                     <button class=\"btn btn-default\" data-action=\"#\" id=\"id_3\">link</button>   263                                 <span data-action=\"insert-bold\">   264                                     <button class=\"btn btn-default\" data-action=\"#\" id=\"id_4\">bold</button>   266                                 <span data-action=\"insert-italic\">   267                                     <button class=\"btn btn-default\" data-action=\"#\" id=\"id_5\">italic</button>   269                                 <span data-action=\"insert-bullet-points\">   270                                     <button class=\"btn btn-default\" data-action=\"#\" id=\"id_7\">bulletpoint</button>   272                                 <span data-action=\"insert-enumeration\">   273                                     <button class=\"btn btn-default\" data-action=\"#\" id=\"id_6\">numberedlist</button>   277                              <textarea id=\"id_1\" class=\"c-field-textarea\" name=\"name_0\" minlength=\"$min\" maxlength=\"$max\"></textarea>   278                             <div class=\"ui-input-textarea-remainder\"> ui_chars_remaining<span data-action=\"remainder\">$max</span></div>   279                         <div class=\"c-field-markdown__preview hidden\">   284                 <div class=\"c-input__help-byline\">$byline</div>   291         $this->assertEquals($expected, $html);
 
 
 
 
◆ testRenderWithRequired()
      
        
          | MarkdownTest::testRenderWithRequired  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 351 of file MarkdownTest.php.
References getRendererWithStubs().
  353         $label = 
'test_label';
   354         $byline = 
'test_byline';
   356         $input = $this->factory->markdown(
   357             $this->markdown_renderer,
   360         )->withRequired(
true)->withNameFrom($this->name_source);
   362         $expected = $this->brutallyTrimHTML(
   364             <fieldset class=\"c-input\" data-il-ui-component=\"markdown-field-input\" data-il-ui-input-name=\"name_0\" id=\"id_8\" tabindex=\"0\">   365                 <label>$label<span class=\"asterisk\" aria-label=\"required_field\">*</span></label>   366                 <div class=\"c-input__field\">   368                         <div class=\"c-field-markdown\">   369                             <div class=\"c-field-markdown__controls\">   371                                 <div class=\"c-field-markdown__actions\">   372                                     <span data-action=\"insert-heading\">   373                                         <button class=\"btn btn-default\" data-action=\"#\" id=\"id_2\">header</button>   375                                     <span data-action=\"insert-link\">   376                                         <button class=\"btn btn-default\" data-action=\"#\" id=\"id_3\">link</button>   378                                     <span data-action=\"insert-bold\">   379                                         <button class=\"btn btn-default\" data-action=\"#\" id=\"id_4\">bold</button>   381                                     <span data-action=\"insert-italic\">   382                                         <button class=\"btn btn-default\" data-action=\"#\" id=\"id_5\">italic</button>   384                                     <span data-action=\"insert-bullet-points\">   385                                         <button class=\"btn btn-default\" data-action=\"#\" id=\"id_7\">bulletpoint</button>   387                                     <span data-action=\"insert-enumeration\">   388                                         <button class=\"btn btn-default\" data-action=\"#\" id=\"id_6\">numberedlist</button>   392                                  <textarea id=\"id_1\" class=\"c-field-textarea\" name=\"name_0\"></textarea>   393                         <div class=\"c-field-markdown__preview hidden\">   398                 <div class=\"c-input__help-byline\">$byline</div>   405         $this->assertEquals($expected, $html);
 
 
 
 
◆ $bold_glyph_mock
  
  
      
        
          | Glyph MarkdownTest::$bold_glyph_mock | 
         
       
   | 
  
protected   | 
  
 
 
◆ $bulledpoint_glyph_mock
  
  
      
        
          | Glyph MarkdownTest::$bulledpoint_glyph_mock | 
         
       
   | 
  
protected   | 
  
 
 
◆ $factory
  
  
      
        
          | FieldFactory MarkdownTest::$factory | 
         
       
   | 
  
protected   | 
  
 
 
◆ $header_glyph_mock
  
  
      
        
          | Glyph MarkdownTest::$header_glyph_mock | 
         
       
   | 
  
protected   | 
  
 
 
◆ $italic_glyph_mock
  
  
      
        
          | Glyph MarkdownTest::$italic_glyph_mock | 
         
       
   | 
  
protected   | 
  
 
 
◆ $link_glyph_mock
  
  
      
        
          | Glyph MarkdownTest::$link_glyph_mock | 
         
       
   | 
  
protected   | 
  
 
 
◆ $markdown_renderer
◆ $name_source
◆ $numberedlist_glyph_mock
  
  
      
        
          | Glyph MarkdownTest::$numberedlist_glyph_mock | 
         
       
   | 
  
protected   | 
  
 
 
◆ $view_control_mock
  
  
      
        
          | ViewControlMode MarkdownTest::$view_control_mock | 
         
       
   | 
  
protected   | 
  
 
 
◆ TEST_ASYNC_URL
  
  
      
        
          | const MarkdownTest::TEST_ASYNC_URL = 'https://localhost' | 
         
       
   | 
  
protected   | 
  
 
 
◆ TEST_PARAMETER_NAME
  
  
      
        
          | const MarkdownTest::TEST_PARAMETER_NAME = 'preview' | 
         
       
   | 
  
protected   | 
  
 
 
The documentation for this class was generated from the following file: