diff --git a/src/CustomLivewireAssertionsMixin.php b/src/CustomLivewireAssertionsMixin.php index 6cb5d5f..be09e8e 100644 --- a/src/CustomLivewireAssertionsMixin.php +++ b/src/CustomLivewireAssertionsMixin.php @@ -154,7 +154,7 @@ public function assertMethodWiredToEvent(): Closure return function (string $method, string $event) { PHPUnit::assertMatchesRegularExpression( '/wire:'.preg_quote($event, '/').'(\.[a-zA-Z0-9\-]+)*=(?"|\')'.$method.'(\s*\(.+\)\s*)?\s*(\k\'q\')/', - $this->stripOutInitialData($this->lastRenderedDom) + $this->html() ); return $this; @@ -169,7 +169,7 @@ public function assertMethodNotWiredToEvent(): Closure return function (string $method, string $event) { PHPUnit::assertDoesNotMatchRegularExpression( '/wire:'.preg_quote($event, '/').'(\.[a-zA-Z0-9\-]+)*=(?"|\')'.$method.'(\s*\(.+\)\s*)?\s*(\k\'q\')/', - $this->stripOutInitialData($this->lastRenderedDom) + $this->html() ); return $this; @@ -184,7 +184,7 @@ public function assertMethodWiredToEventWithoutModifiers(): Closure return function (string $method, string $event) { PHPUnit::assertMatchesRegularExpression( '/wire:'.preg_quote($event, '/').'=(?"|\')'.$method.'(\s*\(.+\)\s*)?\s*(\k\'q\')/', - $this->stripOutInitialData($this->lastRenderedDom) + $this->html() ); return $this; @@ -199,7 +199,7 @@ public function assertMethodNotWiredToEventWithoutModifiers(): Closure return function (string $method, string $event) { PHPUnit::assertDoesNotMatchRegularExpression( '/wire:'.preg_quote($event, '/').'=(?"|\')'.$method.'(\s*\(.+\)\s*)?\s*(\k\'q\')/', - $this->stripOutInitialData($this->lastRenderedDom) + $this->html() ); return $this;