assertEquals($expected, $config->isuseDualstackEndpoint()); } public function correctValueCases() { return [ [true, true], [false, false], ['1', true], ['0', false], ['true', true], ['false', false], [1, true], [0, false], ]; } public function testToArray() { $config = new Configuration(true, 'us-east-1'); $expected = [ 'use_dual_stack_endpoint' => true, ]; $this->assertEquals($expected, $config->toArray()); } public function testThrowsOnInvalidEndpointsType() { $this->expectException(\Aws\Endpoint\UseDualstackEndpoint\Exception\ConfigurationException::class); $this->expectExceptionMessage("'use_dual_stack_endpoint' config option must be a boolean value"); new Configuration('not a boolean', 'us-east-1'); } public function testThrowsOnInvalidRegion() { $this->expectException(\Aws\Endpoint\UseDualstackEndpoint\Exception\ConfigurationException::class); $this->expectExceptionMessage("Dual-stack is not supported in ISO regions"); new Configuration(true, 'something-iso-something'); } }