summaryrefslogtreecommitdiffstats
path: root/tests/Psecio/Gatekeeper/DataSourceTest.php
blob: acf52a2a84c7bd9ebafe6f0999aea3dac6031cab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php

namespace Psecio\Gatekeeper;

class DataSourceTest extends \Psecio\Gatekeeper\Base
{
    /**
     * Test the getter/setter for the data source configuration
     */
    public function testGetSetConfigFunction()
    {
        $config = array('test' => 'foo');
        $ds = $this->getMockForAbstractClass('\Psecio\Gatekeeper\DataSource', array($config));

        $ds->setConfig($config);
        $this->assertEquals($ds->getConfig(), $config);
    }

    /**
     * Test the setting for the data source configuration in constructor
     */
    public function testGetSetConfigConstruct()
    {
        $config = array('test' => 'foo');
        $ds = $this->getMockForAbstractClass('\Psecio\Gatekeeper\DataSource', array($config));
        $this->assertEquals($ds->getConfig(), $config);
    }
}