@@ -24,12 +24,12 @@ public function assertHtml5(): Closure
2424 return function () {
2525 /** @var TestComponent $this */
2626 Assert::assertNotEmpty (
27- (string ) $ this -> rendered ,
27+ (string ) $ this ,
2828 'The component is empty! '
2929 );
3030
3131 try {
32- $ parser = DomParser::new ((string ) $ this -> rendered );
32+ $ parser = DomParser::new ((string ) $ this );
3333 } catch (DOMException $ exception ) {
3434 Assert::fail ($ exception ->getMessage ());
3535 }
@@ -49,12 +49,12 @@ public function assertElementExists(): Closure
4949 return function ($ selector = 'body ' , $ callback = null ): TestComponent {
5050 /** @var TestComponent $this */
5151 Assert::assertNotEmpty (
52- (string ) $ this -> rendered ,
52+ (string ) $ this ,
5353 'The component is empty! '
5454 );
5555
5656 try {
57- $ parser = DomParser::new ((string ) $ this -> rendered );
57+ $ parser = DomParser::new ((string ) $ this );
5858 } catch (DOMException $ exception ) {
5959 Assert::fail ($ exception ->getMessage ());
6060 }
@@ -73,7 +73,7 @@ public function assertElementExists(): Closure
7373 Assert::assertNotNull ($ element , sprintf ('No element found with selector: %s ' , $ selector ));
7474
7575 if ($ callback ) {
76- $ callback (new AssertElement ((string ) $ this -> rendered , $ element ));
76+ $ callback (new AssertElement ((string ) $ this , $ element ));
7777 }
7878
7979 return $ this ;
@@ -85,12 +85,12 @@ public function assertFormExists(): Closure
8585 return function ($ selector = 'form ' , $ callback = null ): TestComponent {
8686 /** @var TestComponent $this */
8787 Assert::assertNotEmpty (
88- (string ) $ this -> rendered ,
88+ (string ) $ this ,
8989 'The component is empty! '
9090 );
9191
9292 try {
93- $ parser = DomParser::new ((string ) $ this -> rendered );
93+ $ parser = DomParser::new ((string ) $ this );
9494 } catch (DOMException $ exception ) {
9595 Assert::fail ($ exception ->getMessage ());
9696 }
@@ -116,7 +116,7 @@ public function assertFormExists(): Closure
116116 'Element is not of type form! ' );
117117
118118 if ($ callback ) {
119- $ callback (new AssertForm ((string ) $ this -> rendered , $ form ));
119+ $ callback (new AssertForm ((string ) $ this , $ form ));
120120 }
121121
122122 return $ this ;
0 commit comments