]> BookStack Code Mirror - bookstack/blobdiff - tests/TestResponse.php
Modernize third party services' logos
[bookstack] / tests / TestResponse.php
index 39a9d796b12a218085e092235ffe21f553d91bd6..79f173c9b1bee136dee5552093c418eb26cb5488 100644 (file)
@@ -26,6 +26,14 @@ class TestResponse extends BaseTestResponse
         return $this->crawlerInstance;
     }
 
+    /**
+     * Get the HTML of the first element at the given selector.
+     */
+    public function getElementHtml(string $selector): string
+    {
+        return $this->crawler()->filter($selector)->first()->outerHtml();
+    }
+
     /**
      * Assert the response contains the specified element.
      *