Skip to content

Commit

Permalink
Refactor test classes to extend TestCase
Browse files Browse the repository at this point in the history
  • Loading branch information
tarikkamat committed Sep 17, 2024
1 parent 617f976 commit 84361f6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 23 deletions.
5 changes: 3 additions & 2 deletions tests/Iyzipay/Tests/CurlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Iyzipay\Curl;

class CurlTest extends \PHPUnit_Framework_TestCase
class CurlTest extends TestCase
{
public function test_should_exec_curl()
{
Expand All @@ -13,7 +13,8 @@ public function test_should_exec_curl()
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_VERBOSE => false,
CURLOPT_HEADER => false));
CURLOPT_HEADER => false
));

$this->assertNotNull($ret);
$this->assertFalse($ret);
Expand Down
6 changes: 3 additions & 3 deletions tests/Iyzipay/Tests/DefaultHttpClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

use Iyzipay\DefaultHttpClient;

class DefaultHttpClientTest extends \PHPUnit_Framework_TestCase
class DefaultHttpClientTest extends TestCase
{
private $curl;

public function setUp()
public function setUp(): void
{
$this->curl = $this->getMockBuilder("Curl")
->setMethods(array("exec"))
Expand Down Expand Up @@ -47,7 +47,7 @@ public function test_should_make_http_getV2()
))
->willReturn("result");

$result = DefaultHttpClient::create($this->curl)->getV2("url","header");
$result = DefaultHttpClient::create($this->curl)->getV2("url", "header");

$this->assertEquals("result", $result);
}
Expand Down
18 changes: 0 additions & 18 deletions tests/Iyzipay/Tests/FileBase64Encoder.php

This file was deleted.

0 comments on commit 84361f6

Please sign in to comment.