mirror of
https://github.com/holidayapi/holidayapi-php.git
synced 2025-06-21 04:16:31 +00:00
Using PHPUnit ^4.8.36 and some PHPUnit stuffs
This commit is contained in:
parent
49d20e06a8
commit
b15f862193
4 changed files with 11 additions and 22 deletions
|
@ -20,11 +20,16 @@
|
||||||
"php": ">=5.3"
|
"php": ">=5.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": ">=4"
|
"phpunit/phpunit": "^4.8.36"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"HolidayAPI\\": "src/"
|
"HolidayAPI\\": "src/"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"autoload-dev": {
|
||||||
|
"psr-4": {
|
||||||
|
"HolidayAPI\\Tests\\": "tests/"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<phpunit
|
<phpunit
|
||||||
colors="true"
|
colors="true"
|
||||||
|
boostrap="./vendor/autoload.php"
|
||||||
convertErrorsToExceptions="true"
|
convertErrorsToExceptions="true"
|
||||||
convertNoticesToExceptions="true"
|
convertNoticesToExceptions="true"
|
||||||
convertWarningsToExceptions="true"
|
convertWarningsToExceptions="true"
|
||||||
|
|
|
@ -2,17 +2,9 @@
|
||||||
namespace HolidayAPI\Tests;
|
namespace HolidayAPI\Tests;
|
||||||
use HolidayAPI\Client;
|
use HolidayAPI\Client;
|
||||||
use HolidayAPI\Request;
|
use HolidayAPI\Request;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
require __DIR__ . '/../vendor/autoload.php';
|
class ClientTest extends TestCase
|
||||||
|
|
||||||
if (
|
|
||||||
!class_exists('\PHPUnit_Framework_TestCase')
|
|
||||||
&& class_exists('\PHPUnit\Framework\TestCase')
|
|
||||||
) {
|
|
||||||
class_alias('\PHPUnit\Framework\TestCase', '\PHPUnit_Framework_TestCase');
|
|
||||||
}
|
|
||||||
|
|
||||||
class ClientTest extends \PHPUnit_Framework_TestCase
|
|
||||||
{
|
{
|
||||||
const BASE_URL = 'https://holidayapi.com/v1/';
|
const BASE_URL = 'https://holidayapi.com/v1/';
|
||||||
const KEY = '8e4de28c-4b18-49f0-9aba-0bd6b424fc38';
|
const KEY = '8e4de28c-4b18-49f0-9aba-0bd6b424fc38';
|
||||||
|
|
|
@ -1,18 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
namespace HolidayAPI\Tests;
|
namespace HolidayAPI\Tests;
|
||||||
use HolidayAPI\Client;
|
|
||||||
use HolidayAPI\Request;
|
use HolidayAPI\Request;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
require __DIR__ . '/../vendor/autoload.php';
|
class RequestTest extends TestCase
|
||||||
|
|
||||||
if (
|
|
||||||
!class_exists('\PHPUnit_Framework_TestCase')
|
|
||||||
&& class_exists('\PHPUnit\Framework\TestCase')
|
|
||||||
) {
|
|
||||||
class_alias('\PHPUnit\Framework\TestCase', '\PHPUnit_Framework_TestCase');
|
|
||||||
}
|
|
||||||
|
|
||||||
class RequestTest extends \PHPUnit_Framework_TestCase
|
|
||||||
{
|
{
|
||||||
public function testExecute()
|
public function testExecute()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue