pyrex-fwi / deejaypool-bundle
测试项目,用于从Digital Dj pool下载文件
Requires
- doctrine/doctrine-bundle: ~1.9
- doctrine/orm: ~2.6
- guzzlehttp/guzzle: ~6.3
- james-heinrich/getid3: ~1.9
- symfony/monolog-bundle: ~3.3
- symfony/serializer: ~3.2|~4.1
Requires (Dev)
- behat/symfony2-extension: ~2.0
- doctrine/doctrine-fixtures-bundle: ~3.0
- escapestudios/symfony2-coding-standard: ~3.0
- friendsofphp/php-cs-fixer: ^2.9
- fzaninotto/faker: ~1.7
- pdepend/pdepend: ^2.5
- phploc/phploc: ^4.0
- phpmd/phpmd: ^2.6
- phpro/grumphp: ^0.12.1
- phpunit/phpunit: ~6.2
- sebastian/phpcpd: ^3.0
- symfony/phpunit-bridge: ^4.1
- symfony/symfony: ~3.4|~4.1
- symfony/var-dumper: ~3.3|~4.1
- theseer/phpdox: ^0.9.0
This package is auto-updated.
Last update: 2024-08-28 06:16:21 UTC
README
入门指南
安装DeejayPoolBundle
更新你的composer.json文件
"require-dev": {
"pyrex-fwi/deejaypool-bundle": "dev-master"
}
或者
composer require pyrex-fwi/deejaypool-bundle
更新你的app/config/AppKernel.php
文件
<?php
public function registerBundles()
{
$bundles = [
// ...
new DeejayPoolBundle\DeejayPoolBundle()
// ...
];
// ...
}
?>
将你的账户信息添加到config.yml中
deejay_pool:
providerName:
credentials:
login: replace_with_yours
password: replace_with_yours
configuration:
root_path: /replace/by/writable/path/destination
支持的提供者
deejay_pool:
av_district:
credentials:
login: %av_district.credentials.login%
password: %av_district.credentials.password%
configuration:
root_path: %av_district.configuration.root_path%
franchise_pool_audio:
credentials:
login: brubruno
password: maladede
configuration:
root_path: %franchise_pool.configuration.root_path%
franchise_pool_video:
credentials:
login: %franchise_pool.credentials.login%
password: %franchise_pool.credentials.password%
configuration:
root_path: %franchise_pool.configuration.root_path%
smashvision:
credentials:
login: %smashvision.credentials.login%
password: %smashvision.credentials.password%
configuration:
root_path: %smashvision.configuration.root_path%
控制台用法
- deejay:discover(发现提供者)
- deejay:pool:status(检查账户凭据)
- php app/console deejay:pool:status franchise_pool_audio -vvv
- deejay:pool:download(从特定提供者下载文件)
- 下载文件
- 搜索文件
事件
会话事件
名称 | |
---|---|
SESSION_OPENED | 在PoolProviderInterface::open()成功后 |
SESSION_OPEN_ERROR | 在PoolProviderInterface::open()发生错误时 |
SESSION_CLOSED | 在PoolProviderInterface::close()成功后 |
项目事件
名称 | |
---|---|
ITEMS_POST_GETLIST | 在PoolProviderInterface::getItems()成功页面项目规范化后 |
ITEM_PRE_DOWNLOAD | 在PoolProviderInterface::downloadItem()中触发,在真实请求之前 |
ITEM_SUCCESS_DOWNLOAD | 在项目正确下载时触发 |
ITEM_ERROR_DOWNLOAD | 当itemCanBeDownloaded/ItemPreDownload传播停止/Http下载错误时触发 |
SEARCH_ITEM_LOCALY |
运行测试
- ant install-deps
- ant
- vendor/bin/phpunit -c phpunit.xml --debug --verbose --exclude online
- vendor/bin/phpunit -c phpunit.xml --debug --verbose --coverage-html Tests/TestData/Coverage --exclude online
- vendor/bin/phpunit -c phpunit.xml --debug --verbose --coverage-html Tests/TestData/Coverage --debug --stop-on-error -v
使用真实凭据运行测试
导出凭据登录名和密码
vendor/bin/phpunit -c phpunit.xml --group online --debug --verbose
gitlab-runner exec docker test:Fonctionnel
docker build -t pyrex-fwi/ddp-bundle . docker run -it --rm -v "$PWD":/usr/var/app -w /usr/var/app pyrex-fwi/ddp-bundle bash docker run -it --rm -v "$PWD":/usr/var/app -w /usr/var/app pyrex-fwi/ddp-bundle php tests/app/console.php s:w:c -v --no-mail docker run -it --rm -v ~/PhpstormProjects/webservice-collection-bundle/:/usr/var/app -v ~/.cache/composer:/home/smile/.composer/cache -w /usr/var/app yemistikris/wsc bash docker run -it --rm -v "$PWD":/usr/var/app -v /home/chpyr/.cache/composer:/.composer --user 1000:1000 -w /usr/var/app pyrex-fwi/ddp-bundle ant docker run -it --rm -v "$PWD":/usr/var/app -v /home/chpyr/.cache/composer:/.composer --user 1000:1000 -w /usr/var/app pyrex-fwi/ddp-bundle composer update --prefer-lowest --prefer-stable docker run -it --rm -v "$PWD":/usr/var/app -v /home/chpyr/.cache/composer:/.composer --user 1000:1000 -w /usr/var/app pyrex-fwi/ddp-bundle vendor/bin/phpunit --no-coverage
Docker
eval ssh-agent
docker run -it --rm -v "$PWD":/usr/var/app -v /home/chpyr/.cache/composer:/.composer --user 1000:1000 --env "XDEBUG_CONFIG=remote_host=172.17.0.1 remote_port=9000" --env "PHP_IDE_CONFIG=serverName=DEBUG" -w /usr/var/app pyrex-fwi/ddp-bundle vendor/bin/phpunit
docker run -it --rm \
-v /c/Users/Kris/PhpstormProjects/DeejayPoolBundle:/usr/var/app \
-v /C/Users/Kris/AppData/Local/Composer:/.composer \
-w /usr/var/app pyrex-fwi/ddp-bundle bash
/sbin/ip route|awk '/default/ { print $3 }' ==> 172.17.0.1
--env "XDEBUG_CONFIG=remote_host=172.17.0.1 remote_port=9000" --env "PHP_IDE_CONFIG=serverName=DEBUG"
export XDEBUG_CONFIG="idekey=DEBUG remote_host=172.17.0.1 remote_port=9000" && export PHP_IDE_CONFIG="serverName=DEBUG"