Passed
Push — master ( eb0fcb...47bdab )
by Gabriel
04:01 queued 10s
created

Bootstrap4Test::testRenderRow()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 1
Metric Value
eloc 9
dl 0
loc 12
rs 9.9666
c 2
b 1
f 1
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Nip\Form\Tests\Renderer;
4
5
use Nip\Form\Form;
6
use Nip\Form\Tests\AbstractTest;
7
8
/**
9
 * Class Bootstrap4Test
10
 * @package Nip\Form\Tests\Renderer
11
 */
12
class Bootstrap4Test extends AbstractTest
13
{
14
    public function testRenderRow()
15
    {
16
        $form = new Form();
17
        $form->setRendererType('Bootstrap4');
18
        $form->add('test_input');
19
20
        self::assertSame(
21
            '<div class="form-group row-test_input">'
22
            .'<label class="col-form-label ">Test_input:</label>'
23
            .'<input  type="text" name="test_input" class="form-control " title="Test_input" />'
24
            .'</div>',
25
            $form->getRenderer()->renderRow($form->getElement('test_input'))
0 ignored issues
show
Bug introduced by
The method renderRow() does not exist on Nip_Form_Renderer_Basic. Did you maybe mean renderRows()? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

25
            $form->getRenderer()->/** @scrutinizer ignore-call */ renderRow($form->getElement('test_input'))

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
26
        );
27
    }
28
}
29