for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Imanghafoori\HeyMan\MakeSure;
class HttpClient
{
public $http = [];
public $assertion;
public $app;
public $event;
public $exception;
/**
* HttpClient constructor.
*
* @param $app
*/
public function __construct($app)
$this->app = $app;
}
public function sendingPostRequest($uri, array $data = [], array $headers = []): IsRespondedWith
$this->http = [
'method' => 'post',
'url' => $uri,
'data' => $data,
'headers' => $headers,
];
return new IsRespondedWith($this);
public function sendingDeleteRequest($uri, array $data = [], array $headers = [])
'method' => 'delete',
public function sendingPutRequest($uri, array $data = [], array $headers = [])
'method' => 'put',
public function sendingPatchRequest($uri, array $data = [], array $headers = [])
'method' => 'patch',
public function sendingGetRequest($url): IsRespondedWith
'method' => 'get',
'url' => $url,
'data' => [],
public function exceptionIsThrown($type)
$this->exception = $type;
public function whenEventHappens($event)
$this->event = $event;
return $this;
public function whenYouReachCheckPoint($name)
return $this->whenEventHappens('heyman_checkpoint_'.$name);
public function __destruct()
(new CheckExpectations($this))->check();