/** * Checks the settings will allow random stuff to be set. * * @test * @covers \Bairwell\MiddlewareCors::__construct * @covers \Bairwell\MiddlewareCors::getSettings */ public function testCheckChangedSettingsViaSetterRandomSettings() { $sut = new MiddlewareCors(); $sut->setSettings(['maxAge' => 123, 'allowCredentials' => true, 'random' => '123']); $expected = $this->defaults; $expected['maxAge'] = 123; $expected['allowCredentials'] = true; $expected['random'] = '123'; $settings = $sut->getSettings(); $this->arraysAreSimilar($expected, $settings); }