for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace FlexPHP\Repositories\Tests\Mocks;
use FlexPHP\Repositories\Repository;
/**
* Class RepositoryMock
* @package FlexPHP\Repositories\Tests\Mocks
* @method GatewayMock getGateway()
*/
class RepositoryMock extends Repository
{
* @param array $item
* @return int
* @throws \FlexPHP\Repositories\Exception\UndefinedGatewayRepositoryException
public function push(array $item)
return $this->getGateway()->create($item);
}
* @param int $id
* @return array|null
public function get(int $id)
return $this->getGateway()->read($id);
* @return bool
public function shift(int $id, array $item)
return $this->getGateway()->update($id, $item);
public function pop(int $id)
return $this->getGateway()->delete($id);