Skip to content

Jedox OLAP testing library written in PHP relying on PHPUnit

License

Notifications You must be signed in to change notification settings

xodej/php-olest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-olest

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.

About

Jedox OLAP testing library written in PHP relying on PHPUnit

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages