| Conditions | 1 |
| Paths | 1 |
| Total Lines | 26 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | public function testCreatePaypalAccount() |
||
| 18 | { |
||
| 19 | $userDetails = [ |
||
| 20 | 'name' => 'Mahmoud Zalt', |
||
| 21 | 'email' => '[email protected]', |
||
| 22 | 'password' => 'passssssssssss', |
||
| 23 | ]; |
||
| 24 | // get the logged in user (create one if no one is logged in) |
||
| 25 | $user = $this->registerAndLoginTestingUser($userDetails); |
||
|
|
|||
| 26 | |||
| 27 | $data = [ |
||
| 28 | // TODO: To Be Continue... |
||
| 29 | ]; |
||
| 30 | |||
| 31 | // send the HTTP request |
||
| 32 | $response = $this->apiCall($this->endpoint, 'post', $data, true); |
||
| 33 | |||
| 34 | // assert response status is correct |
||
| 35 | $this->assertEquals($response->getStatusCode(), '202'); |
||
| 36 | |||
| 37 | // convert JSON response string to Object |
||
| 38 | $responseObject = $this->getResponseObject($response); |
||
| 39 | |||
| 40 | $this->assertEquals($responseObject->message, 'Paypal account created successfully.'); |
||
| 41 | |||
| 42 | } |
||
| 43 | |||
| 45 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVarassignment in line 1 and the$higherassignment in line 2 are dead. The first because$myVaris never used and the second because$higheris always overwritten for every possible time line.