mirror of
https://github.com/metowolf/Meting.git
synced 2026-09-03 07:27:07 +08:00
🚗 Remove PHPUnit
This commit is contained in:
38
.travis.yml
38
.travis.yml
@@ -1,22 +1,28 @@
|
||||
language: php
|
||||
|
||||
php:
|
||||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
- 7.2
|
||||
- nightly
|
||||
- hhvm
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
|
||||
include:
|
||||
- php: '5.4'
|
||||
- php: '5.5'
|
||||
- php: '5.6'
|
||||
- php: '7.0'
|
||||
- php: '7.1'
|
||||
- php: '7.2'
|
||||
- php: '7.3'
|
||||
- php: 'nightly'
|
||||
- php: 'hhvm'
|
||||
|
||||
allow_failures:
|
||||
- php: nightly
|
||||
- php: hhvm
|
||||
- php: '5.4'
|
||||
- php: '5.5'
|
||||
- php: '5.6'
|
||||
- php: '7.0'
|
||||
- php: 'nightly'
|
||||
- php: 'hhvm'
|
||||
|
||||
sudo: false
|
||||
sudo: false
|
||||
|
||||
before_install:
|
||||
- composer install --dev -n --prefer-source
|
||||
|
||||
script:
|
||||
- vendor/bin/phpunit -c phpunit.xml.dist
|
||||
script:
|
||||
- find -L . -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l
|
||||
|
||||
@@ -1,41 +1,38 @@
|
||||
{
|
||||
"name": "metowolf/meting",
|
||||
"type": "library",
|
||||
"description": "A powerful music API framework to accelerate development.",
|
||||
"keywords": [
|
||||
"php music",
|
||||
"music api",
|
||||
"lighty",
|
||||
"lightweight"
|
||||
],
|
||||
"homepage": "https://github.com/metowolf/Meting",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "metowolf",
|
||||
"email": "i@i-meto.com",
|
||||
"homepage": "https://i-meto.com"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/metowolf/Meting/issues",
|
||||
"source": "https://github.com/metowolf/Meting"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4.0",
|
||||
"ext-curl": "*",
|
||||
"ext-openssl": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-bcmath": "Required to use BC Math calculate RSA.",
|
||||
"ext-openssl": "Required to use OpenSSL encrypt params."
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Metowolf\\" : "src/"
|
||||
}
|
||||
}
|
||||
"name": "metowolf/meting",
|
||||
"type": "library",
|
||||
"description": "A powerful music API framework to accelerate development.",
|
||||
"keywords": [
|
||||
"php music",
|
||||
"music api",
|
||||
"lighty",
|
||||
"lightweight"
|
||||
],
|
||||
"homepage": "https://github.com/metowolf/Meting",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "metowolf",
|
||||
"email": "i@i-meto.com",
|
||||
"homepage": "https://i-meto.com"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/metowolf/Meting/issues",
|
||||
"source": "https://github.com/metowolf/Meting"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4.0",
|
||||
"ext-curl": "*",
|
||||
"ext-openssl": "*"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-bcmath": "Required to use BC Math calculate RSA.",
|
||||
"ext-openssl": "Required to use OpenSSL encrypt params."
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Metowolf\\" : "src/"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit backupGlobals="false"
|
||||
backupStaticAttributes="false"
|
||||
beStrictAboutTestsThatDoNotTestAnything="true"
|
||||
beStrictAboutOutputDuringTests="true"
|
||||
bootstrap="vendor/autoload.php"
|
||||
colors="true"
|
||||
convertErrorsToExceptions="true"
|
||||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
failOnRisky="true"
|
||||
failOnWarning="true"
|
||||
processIsolation="false"
|
||||
stopOnError="false"
|
||||
stopOnFailure="false"
|
||||
verbose="true"
|
||||
>
|
||||
<testsuites>
|
||||
<testsuite name="Meting Test Suite">
|
||||
<directory suffix="Test.php">./tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<filter>
|
||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">./src</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
</phpunit>
|
||||
@@ -1,52 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Metowolf\Meting;
|
||||
|
||||
use Metowolf\Meting;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class BaiduTest extends TestCase
|
||||
{
|
||||
public function testSearch()
|
||||
{
|
||||
$api = new Meting('baidu');
|
||||
$data = $api->format(true)->search('hello', array(
|
||||
'limit' => 10,
|
||||
));
|
||||
$data = json_decode($data, true);
|
||||
$this->assertCount(10, $data);
|
||||
}
|
||||
|
||||
public function testSong()
|
||||
{
|
||||
$api = new Meting('baidu');
|
||||
$data = $api->format(true)->song('578055564');
|
||||
$data = json_decode($data, true);
|
||||
$this->assertEquals($data[0]['id'], 578055564);
|
||||
}
|
||||
|
||||
public function testPic()
|
||||
{
|
||||
$api = new Meting('baidu');
|
||||
$data = $api->format(true)->pic('578055564');
|
||||
$data = json_decode($data, true);
|
||||
$pic = 'http://qukufile2.qianqian.com/data2/pic/a7e5421338fb4e3a0c0fd102a6dbed6b/578053624/578053624.jpg@s_1,w_300,h_300';
|
||||
$this->assertEquals($pic, $data['url']);
|
||||
}
|
||||
|
||||
public function testUrl()
|
||||
{
|
||||
$api = new Meting('baidu');
|
||||
$data = $api->format(false)->url('578055564');
|
||||
$data = json_decode($data, true);
|
||||
$this->assertNotEmpty($data['songurl']['url']);
|
||||
}
|
||||
|
||||
public function testLyric()
|
||||
{
|
||||
$api = new Meting('baidu');
|
||||
$data = $api->format(true)->lyric('578055564');
|
||||
$data = json_decode($data, true);
|
||||
$this->assertNotEmpty($data);
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Metowolf\Meting;
|
||||
|
||||
use Metowolf\Meting;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class KugouTest extends TestCase
|
||||
{
|
||||
public function testSearch()
|
||||
{
|
||||
$api = new Meting('kugou');
|
||||
$data = $api->format(true)->search('hello', array(
|
||||
'limit' => 10,
|
||||
));
|
||||
$data = json_decode($data, true);
|
||||
$this->assertCount(10, $data);
|
||||
}
|
||||
|
||||
public function testSong()
|
||||
{
|
||||
$api = new Meting('kugou');
|
||||
$data = $api->format(true)->song('d353b69a3b7f1a250000c5daabb8a4f1');
|
||||
$data = json_decode($data, true);
|
||||
$this->assertEquals(strtolower($data[0]['id']), 'd353b69a3b7f1a250000c5daabb8a4f1');
|
||||
}
|
||||
|
||||
public function testPic()
|
||||
{
|
||||
$api = new Meting('kugou');
|
||||
$data = $api->format(true)->pic('d353b69a3b7f1a250000c5daabb8a4f1');
|
||||
$data = json_decode($data, true);
|
||||
$pic = 'http://singerimg.kugou.com/uploadpic/softhead/400/20180528/20180528181654229.jpg';
|
||||
$this->assertEquals($pic, $data['url']);
|
||||
}
|
||||
|
||||
public function testUrl()
|
||||
{
|
||||
$api = new Meting('kugou');
|
||||
$data = $api->format(false)->url('d353b69a3b7f1a250000c5daabb8a4f1');
|
||||
$data = json_decode($data, true);
|
||||
$this->assertNotEmpty($data['data'][0]['relate_goods']);
|
||||
}
|
||||
|
||||
public function testLyric()
|
||||
{
|
||||
$api = new Meting('kugou');
|
||||
$data = $api->format(true)->lyric('d353b69a3b7f1a250000c5daabb8a4f1');
|
||||
$data = json_decode($data, true);
|
||||
$this->assertNotEmpty($data);
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Metowolf\Meting;
|
||||
|
||||
use Metowolf\Meting;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class NeteaseTest extends TestCase
|
||||
{
|
||||
public function testSearch()
|
||||
{
|
||||
$api = new Meting('netease');
|
||||
$data = $api->format(true)->search('hello', array(
|
||||
'limit' => 10,
|
||||
));
|
||||
$data = json_decode($data, true);
|
||||
$this->assertCount(10, $data);
|
||||
}
|
||||
|
||||
public function testSong()
|
||||
{
|
||||
$api = new Meting('netease');
|
||||
$data = $api->format(true)->song('35847388');
|
||||
$data = json_decode($data, true);
|
||||
$this->assertEquals($data[0]['id'], 35847388);
|
||||
}
|
||||
|
||||
public function testPic()
|
||||
{
|
||||
$api = new Meting('netease');
|
||||
$data = $api->format(true)->pic('3388694837506899');
|
||||
$data = json_decode($data, true);
|
||||
$pic = 'https://p3.music.126.net/br3IrdCvT7-GjCyUVNONiA==/3388694837506899.jpg?param=300y300';
|
||||
$this->assertEquals($pic, $data['url']);
|
||||
}
|
||||
|
||||
public function testUrl()
|
||||
{
|
||||
$api = new Meting('netease');
|
||||
$data = $api->format(false)->url('35847388');
|
||||
$data = json_decode($data, true);
|
||||
$this->assertEquals($data['code'], 200);
|
||||
}
|
||||
|
||||
public function testLyric()
|
||||
{
|
||||
$api = new Meting('netease');
|
||||
$data = $api->format(true)->lyric('418603133');
|
||||
$data = json_decode($data, true);
|
||||
$this->assertNotEmpty($data);
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Metowolf\Meting;
|
||||
|
||||
use Metowolf\Meting;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class TencentTest extends TestCase
|
||||
{
|
||||
public function testSearch()
|
||||
{
|
||||
$api = new Meting('tencent');
|
||||
$data = $api->format(true)->search('hello', array(
|
||||
'limit' => 10,
|
||||
));
|
||||
$data = json_decode($data, true);
|
||||
$this->assertCount(10, $data);
|
||||
}
|
||||
|
||||
public function testSong()
|
||||
{
|
||||
$api = new Meting('tencent');
|
||||
$data = $api->format(true)->song('000bdxcy3ta8Q3');
|
||||
$data = json_decode($data, true);
|
||||
$this->assertEquals($data[0]['id'], '000bdxcy3ta8Q3');
|
||||
}
|
||||
|
||||
public function testPic()
|
||||
{
|
||||
$api = new Meting('tencent');
|
||||
$data = $api->format(true)->pic('000bdxcy3ta8Q3');
|
||||
$data = json_decode($data, true);
|
||||
$pic = 'https://y.gtimg.cn/music/photo_new/T002R300x300M000000bdxcy3ta8Q3.jpg?max_age=2592000';
|
||||
$this->assertEquals($pic, $data['url']);
|
||||
}
|
||||
|
||||
public function testUrl()
|
||||
{
|
||||
$api = new Meting('tencent');
|
||||
$data = $api->format(true)->url('000bdxcy3ta8Q3');
|
||||
$data = json_decode($data, true);
|
||||
$this->assertNotEmpty($data['url']);
|
||||
}
|
||||
|
||||
public function testLyric()
|
||||
{
|
||||
$api = new Meting('tencent');
|
||||
$data = $api->format(true)->lyric('000bdxcy3ta8Q3');
|
||||
$data = json_decode($data, true);
|
||||
$this->assertNotEmpty($data);
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Metowolf\Meting;
|
||||
|
||||
use Metowolf\Meting;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class XiamiTest extends TestCase
|
||||
{
|
||||
public function testSearch()
|
||||
{
|
||||
$api = new Meting('xiami');
|
||||
$data = $api->format(true)->search('hello', array(
|
||||
'limit' => 10,
|
||||
));
|
||||
$data = json_decode($data, true);
|
||||
$this->assertCount(10, $data);
|
||||
}
|
||||
|
||||
public function testSong()
|
||||
{
|
||||
$api = new Meting('xiami');
|
||||
$data = $api->format(true)->song('1774998338');
|
||||
$data = json_decode($data, true);
|
||||
$this->assertEquals($data[0]['id'], 1774998338);
|
||||
}
|
||||
|
||||
public function testPic()
|
||||
{
|
||||
$api = new Meting('xiami');
|
||||
$data = $api->format(true)->pic('1774998338');
|
||||
$data = json_decode($data, true);
|
||||
$pic = 'https://pic.xiami.net/images/album/img85/23485/21002261901445585261.jpeg@1e_1c_100Q_300h_300w';
|
||||
$this->assertEquals($pic, $data['url']);
|
||||
}
|
||||
|
||||
public function testUrl()
|
||||
{
|
||||
$api = new Meting('xiami');
|
||||
$data = $api->format(false)->url('1774998338');
|
||||
$data = json_decode($data, true);
|
||||
$this->assertEquals($data['ret'][0], 'SUCCESS::调用成功');
|
||||
}
|
||||
|
||||
public function testLyric()
|
||||
{
|
||||
$api = new Meting('xiami');
|
||||
$data = $api->format(true)->lyric('1774998338');
|
||||
$data = json_decode($data, true);
|
||||
$this->assertNotEmpty($data);
|
||||
}
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
// $api->site('netease');
|
||||
// $data = $api->format(true)->search('hello');
|
||||
// $data = $api->format(true)->song('35847388');
|
||||
// $data = $api->format(true)->album('35501199');
|
||||
// $data = $api->format(true)->playlist('436843836');
|
||||
// $data = $api->format(true)->artist('3681');
|
||||
// $data = $api->format(true)->pic('1407374890649284');
|
||||
// $data = $api->format(true)->url('35847388');
|
||||
// $data = $api->format(true)->lyric('35847388');
|
||||
|
||||
// $api->site('tencent');
|
||||
// $data = $api->format(true)->search('hello');
|
||||
// $data = $api->format(true)->song('000jDQWP4JiB3y');
|
||||
// $data = $api->format(true)->album('003rytri2FHG3V');
|
||||
// $data = $api->format(true)->playlist('1144188779');
|
||||
// $data = $api->format(true)->artist('003Nz2So3XXYek');
|
||||
// $data = $api->format(true)->pic('002rBshp4WPAut');
|
||||
// $data = $api->format(true)->url('001icUif3vTGcO', 24);
|
||||
// $data = $api->format(true)->lyric('001icUif3vTGcO');
|
||||
|
||||
// $api->site('xiami');
|
||||
// $data = $api->format(true)->search('hello');
|
||||
// $data = $api->format(true)->song('1774998338');
|
||||
// $data = $api->format(true)->album('2100226190');
|
||||
// $data = $api->format(true)->playlist('277809522');
|
||||
// $data = $api->format(true)->artist('23485');
|
||||
// $data = $api->format(true)->pic('1774998338');
|
||||
// $data = $api->format(true)->url('1774998338');
|
||||
// $data = $api->format(true)->lyric('1774998338');
|
||||
|
||||
// $api->site('kugou');
|
||||
// $data = $api->format(true)->search('hello');
|
||||
// $data = $api->format(true)->song('9ed11b0c5a86f33541fa88b57c5ba00a');
|
||||
// $data = $api->format(true)->album('1645030');
|
||||
// $data = $api->format(true)->playlist('119859');
|
||||
// $data = $api->format(true)->artist('3520');
|
||||
// $data = $api->format(true)->pic('9ed11b0c5a86f33541fa88b57c5ba00a');
|
||||
// $data = $api->format(true)->url('9ed11b0c5a86f33541fa88b57c5ba00a');
|
||||
// $data = $api->format(true)->lyric('9ed11b0c5a86f33541fa88b57c5ba00a');
|
||||
|
||||
// $api->site('baidu');
|
||||
// $data = $api->format(true)->search('陈奕迅');
|
||||
// $data = $api->format(true)->song('578055564');
|
||||
// $data = $api->format(true)->album('541223882');
|
||||
// $data = $api->format(true)->playlist('364201689');
|
||||
// $data = $api->format(true)->artist('362');
|
||||
// $data = $api->format(true)->pic('578055564');
|
||||
// $data = $api->format(true)->url('578055564');
|
||||
// $data = $api->format(true)->lyric('578055564');
|
||||
Reference in New Issue
Block a user