PayWithAmazon\ClientTest::testConfigArray PHP Method

testConfigArray() public method

public testConfigArray ( )
    public function testConfigArray()
    {
        try {
            $client = new Client($this->configParams);
        } catch (\Exception $expected) {
            $this->assertRegExp('/is not a Json File or the Json File./i', strval($expected));
        }
        try {
            $configParams = array('a' => 'A', 'b' => 'B');
            $client = new Client($configParams);
        } catch (\Exception $expected) {
            $this->assertRegExp('/is either not part of the configuration or has incorrect Key name./i', strval($expected));
        }
        try {
            $configParams = array();
            $client = new Client($configParams);
        } catch (\Exception $expected) {
            $this->assertRegExp('/$config cannot be null./i', strval($expected));
        }
    }