Crud\TestCase\Controller\Crud\CrudComponentTest::testConstructMerging2 PHP Method

testConstructMerging2() public method

Test that providing configuration for a new listener in the Crud setting should preserve the defaults and add the new listener to the array
public testConstructMerging2 ( ) : void
return void
    public function testConstructMerging2()
    {
        $config = ['listeners' => []];
        $Crud = new CrudComponent($this->Registry, $config);
        $result = $Crud->config();
        $expected = ['actions' => [], 'eventPrefix' => 'Crud', 'listeners' => [], 'messages' => ['domain' => 'crud', 'invalidId' => ['code' => 400, 'class' => 'Cake\\Network\\Exception\\BadRequestException', 'text' => 'Invalid id'], 'recordNotFound' => ['code' => 404, 'class' => 'Cake\\Network\\Exception\\NotFoundException', 'text' => 'Not found'], 'badRequestMethod' => ['code' => 405, 'class' => 'Cake\\Network\\Exception\\MethodNotAllowedException', 'text' => 'Method not allowed. This action permits only {methods}']], 'eventLogging' => false];
        $this->assertEquals($expected, $result);
    }