/** * @test */ public function shouldConfigContainFactoryNameAndTitle() { $factory = new KlarnaCheckoutGatewayFactory(); $config = $factory->createConfig(); $this->assertInternalType('array', $config); $this->assertArrayHasKey('payum.factory_name', $config); $this->assertEquals('klarna_checkout', $config['payum.factory_name']); $this->assertArrayHasKey('payum.factory_title', $config); $this->assertEquals('Klarna Checkout', $config['payum.factory_title']); }
/** * @test */ public function shouldConfigurePaths() { $factory = new KlarnaCheckoutGatewayFactory(); $config = $factory->createConfig(); $this->assertInternalType('array', $config); $this->assertNotEmpty($config); $this->assertInternalType('array', $config['payum.paths']); $this->assertNotEmpty($config['payum.paths']); $this->assertArrayHasKey('PayumCore', $config['payum.paths']); $this->assertStringEndsWith('Resources/views', $config['payum.paths']['PayumCore']); $this->assertTrue(file_exists($config['payum.paths']['PayumCore'])); $this->assertArrayHasKey('PayumKlarnaCheckout', $config['payum.paths']); $this->assertStringEndsWith('Resources/views', $config['payum.paths']['PayumKlarnaCheckout']); $this->assertTrue(file_exists($config['payum.paths']['PayumKlarnaCheckout'])); }