Open lfnincao opened 1 week ago
Hey, why should they be switched? 🤔
Hey, because the $action is in place of $methodName and vice-versa. It should be wire:$action=$methodName
public function assertMethodWiredToAction(): Closure
{
return function (string $methodName, string $action) {
PHPUnit::assertMatchesRegularExpression(
'/wire:' . $methodName . '?=(?<q>"|\')'.preg_quote($action).'(\s*\(.+\)\s*)?\s*(\k\'q\')/',
$this->html()
);
return $this;
};
}
public function assertMethodNotWiredToAction(): Closure
{
return function (string $methodName, string $action) {
PHPUnit::assertDoesNotMatchRegularExpression(
'/wire:' . $methodName . '?=(?<q>"|\')'.preg_quote($action).'(\s*\(.+\)\s*)?\s*(\k\'q\')/',
$this->html()
);
return $this;
};
}
Oh I see, you are absolutely right 🙀 Would you be willing to make a PR to fix it?
Definitely, will do. Thank you!
Thank you 🙏
I don't have the permissions
ERROR: Permission to christophrumpel/missing-livewire-assertions.git denied to lfnincao.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
Hey, did you fork the project? Then you can do a Pull Request
At least these two methods have their params switched up (methodName, action) should be (action, methodName) assertMethodWiredToAction() and assertMethodNotWiredToAction()