/** * @test */ public function shouldConfigContainFactoryNameAndTitle() { $factory = new StripeJsGatewayFactory(); $config = $factory->createConfig(); $this->assertInternalType('array', $config); $this->assertArrayHasKey('payum.factory_name', $config); $this->assertEquals('stripe_js', $config['payum.factory_name']); $this->assertArrayHasKey('payum.factory_title', $config); $this->assertEquals('Stripe.Js', $config['payum.factory_title']); }
/** * @test */ public function shouldConfigurePaths() { $factory = new StripeJsGatewayFactory(); $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('PayumStripe', $config['payum.paths']); $this->assertStringEndsWith('Resources/views', $config['payum.paths']['PayumStripe']); $this->assertTrue(file_exists($config['payum.paths']['PayumStripe'])); }