xodej / php-olest
Jedox OLAP data integrity tests
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-08-31 19:38:06 UTC
README
a pure PHP lib for (continuous) testing of a Jedox OLAP
This repository is unstable. Please be careful when updating your app. Some APIs/methods might break or change. If you use the library for professional work you should either fork the version you develop with or refer to a specific commit.
Based on phpunit.
Installation
Requires PHP 7.3+
composer require xodej/php-olapi:dev-master
composer require xodej/php-olest:dev-master
Run tests
./vendor/bin/phpunit --bootstrap vendor/autoload.php tests/AdminTest
Example
<?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', 'http://localhost: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' ); } }
Documentation
For more examples please look here.
License
Licensed under the MIT License.