for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Firebase;
/**
* Class FirebaseStub
*
* Stubs the Firebase interface without issuing any cURL requests.
* @package Firebase
*/
class FirebaseStub extends FirebaseLib implements FirebaseInterface
{
protected $response;
* @param string $path
* @param mixed $data
* @param array $options
* @return mixed
public function set(string $path, $data, array $options = [])
return $this->getSetResponse();
}
public function push(string $path, $data, array $options = [])
return $this->set($path, $data);
public function update(string $path, $data, array $options = [])
public function get(string $path, array $options = [])
return $this->getGetResponse();
* @return null
public function delete(string $path, array $options = [])
return $this->getDeleteResponse();
* @param $expectedResponse
public function setResponse($expectedResponse): void
$this->response = $expectedResponse;
private function getSetResponse()
return $this->response;
private function getGetResponse()
private function getDeleteResponse()