xodej / php-olest
Jedox OLAP 数据完整性测试
dev-master
2024-07-31 19:24 UTC
Requires
- php: >=7.4.0
- xodej/php-olapi: @dev
Requires (Dev)
- phpunit/phpunit: 9.6.20
This package is auto-updated.
Last update: 2024-10-01 00:10:22 UTC
README
用于(持续)测试 Jedox OLAP 的纯 PHP 库
此存储库是不稳定的。请谨慎更新您的应用程序。某些 API/方法可能会中断或更改。如果您在专业工作中使用此库,您应该分叉您开发的版本或参考特定的提交。
基于 phpunit。
安装
需要 PHP 7.3+
composer require xodej/php-olapi:dev-master
composer require xodej/php-olest:dev-master
运行测试
./vendor/bin/phpunit --bootstrap vendor/autoload.php tests/AdminTest
示例
<?php // file ./tests/AdminTest.php declare(strict_types=1); use Xodej\Olest\OlapTestCase; use Xodej\Olest\CubeNumParam; use Xodej\Olest\ConnectionFactory; class AdminTest extends OlapTestCase { // define test public function testAdminIsAdmin(): void { // establish connection with Jedox OLAP $connection = ConnectionFactory::getConnection('prod', 'https://:7777', 'admin', 'admin'); $cube = $connection->getCube('System/#_USER_GROUP'); // assert that user "admin" is assigned to user group "admin" $this->assertOlapEquals( 1, new CubeNumParam($cube, ['admin', 'admin']), 'admin user is not assigned to admin group' ); } }
文档
更多示例请参阅 这里。
许可证
根据 MIT 许可证授权。