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 authored and erdemdmr committed Sep 17, 2024
1 parent 617f976 commit 3750b81
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/github_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.4']
php-versions: ['7.4', '8.0', '8.1', '8.2']
include:
- php-versions: '7.4'

Expand Down
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 3750b81

Please sign in to comment.