/** * @covers wishlist\classes\BaseApi::deleteItem */ public function testDeleteItem() { $result = $this->object->deleteItem(2, 4); $this->assertNotEmpty($result); $this->assertInternalType('string', $result); $this->assertRegExp('/Операция успешна/', $result); }
function __construct() { parent::__construct(); $this->request = file_get_contents('php://input'); if (!empty($this->request)) { $this->request = json_decode($this->request, true); } $this->load->library('form_validation'); }
function __construct($opt = null) { parent::__construct($opt); $this->playlistDb = $opt['PlaylistInfoDB'] ? $opt['PlaylistInfoDB'] : new PlaylistInfoDB(); $this->voiceDb = $opt['VoiceInfoDB'] ? $opt['VoiceInfoDB'] : new VoiceInfoDB(); }
function __construct($userKey, $userSecret) { parent::__construct($userKey, $userSecret); }
<?php include __DIR__ . '/autoload.php'; $baseApi = new BaseApi($_GET); $action = $baseApi->getAction(); $api = new NotificationApi($_GET); list($status, $message) = $api->parseInput($action); $baseApi->renderResponse($status, $message);
public function __construct($request) { parent::__construct($request); $this->db = new Db(); }