lithium\tests\cases\data\ConnectionsTest::testErrorExceptions PHP Method

testErrorExceptions() public method

public testErrorExceptions ( )
    public function testErrorExceptions()
    {
        $config = array('adapter' => 'None', 'type' => 'Error');
        Connections::add('NoConnection', $config);
        $result = false;
        try {
            Connections::get('NoConnection');
        } catch (Exception $e) {
            $result = true;
        }
        $this->assertTrue($result, 'Exception is not thrown');
    }