['name=@Dell\,'], 'order' => '-id' ]; $headers = array("HTTP_Authorization" => " Bearer " . $this->access_token); $response = $this->action( "GET", "OAuth2CompaniesApiController@getAllCompanies", $params, array(), array(), array(), $headers ); $content = $response->getContent(); $companies = json_decode($content); $this->assertTrue(!is_null($companies)); $this->assertResponseStatus(200); } public function testAddCompany(){ $data = [ 'name' => str_random(16).'_company', 'description' => str_random(16).'_description', ]; $headers = [ "HTTP_Authorization" => " Bearer " . $this->access_token, "CONTENT_TYPE" => "application/json" ]; $response = $this->action( "POST", "OAuth2CompaniesApiController@add", [], [], [], [], $headers, json_encode($data) ); $content = $response->getContent(); $this->assertResponseStatus(201); $company = json_decode($content); $this->assertTrue(!is_null($company)); return $company; } public function testAddCompanyBigLogo(){ } }