bluetree-service/event

View on GitHub
test/Config/ArrayConfigTest.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php
/**
 * test Event Object class
 *
 * @package     BlueEvent
 * @subpackage  Test
 * @author      MichaƂ Adamiak    <chajr@bluetree.pl>
 * @copyright   chajr/bluetree
 */
namespace BlueEventTest\Config;

use BlueEvent\Event\Config\ArrayConfig;
use PHPUnit\Framework\TestCase;

class ArrayConfigTest extends TestCase
{
    public function testLoadConfig()
    {
        $arrayConfig = new ArrayConfig;
        $config = $arrayConfig->readConfig(
            $this->getEventFileConfigPath()
        );

        $this->assertEquals(include $this->getEventFileConfigPath(), $config);
    }

    /**
     * config data for test from file
     *
     * @return string
     */
    public function getEventFileConfigPath()
    {
        return __DIR__ . '/testConfig/config.php';
    }
}