Crud\Test\TestCase\Listener\ApiListenerTest::testDefaultConfiguration PHP Method

testDefaultConfiguration() public method

Test default configuration
public testDefaultConfiguration ( ) : void
return void
    public function testDefaultConfiguration()
    {
        $listener = $this->getMockBuilder('\\Crud\\Listener\\ApiListener')->disableOriginalConstructor()->setMethods(null)->getMock();
        $expected = ['viewClasses' => ['json' => 'Json', 'xml' => 'Xml'], 'detectors' => ['json' => ['ext' => 'json', 'accepts' => 'application/json'], 'xml' => ['ext' => 'xml', 'accepts' => 'text/xml']], 'exception' => ['type' => 'default', 'class' => 'Cake\\Network\\Exception\\BadRequestException', 'message' => 'Unknown error', 'code' => 0], 'exceptionRenderer' => 'Crud\\Error\\ExceptionRenderer', 'setFlash' => false];
        $result = $listener->config();
        $this->assertEquals($expected, $result);
    }