Level 37
Just create a method in your Test Class:
// in TestCase.php
public function getCustom($url)
{
return $this->get($url, ['foo' => 'bar']);
}
2 likes
Hi,
I have couple test classes, I am wondering can I somehow attach to every get methods a parameter to the class - f.ex. in constructor.
I use $this->get($url)->assertSee('blabla'); can I put in constructor a modification that every such request will be sent with ['foo'=>'bar'] ?
Just create a method in your Test Class:
// in TestCase.php
public function getCustom($url)
{
return $this->get($url, ['foo' => 'bar']);
}
Please or to participate in this conversation.