From 7f18d6054ebafb9fd9f3f846eecbda8842e2d605 Mon Sep 17 00:00:00 2001 From: Luckas Fiege Date: Tue, 5 Dec 2017 17:18:46 -0300 Subject: [PATCH] Added tests for mixed attributes by tag type --- tests/HtmlElementTest.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/tests/HtmlElementTest.php b/tests/HtmlElementTest.php index 5b9524a..be7abc0 100644 --- a/tests/HtmlElementTest.php +++ b/tests/HtmlElementTest.php @@ -85,4 +85,35 @@ function it_generates_elements_with_boolean_attributes() $this->assertSame('', $element->render()); } + + /** @test */ + function it_generates_a_void_element_with_mixed_attributes() + { + $element = new HtmlElement( + 'input', + ['id' => 'my_paragraph', 'class' => 'paragraph', 'required'], + '' + ); + + $this->assertSame( + '', + $element->render() + ); + } + + /** @test */ + function it_generates_an_element_with_mixed_attributes() + { + $element = new HtmlElement( + 'textarea', + ['id' => 'disabled_paragraph', 'class' => 'paragraph', 'disabled'], + 'Contenido' + ); + + $this->assertSame( + '', + $element->render() + ); + } + } \ No newline at end of file