/** * @test * * @expectedException \Payum\Core\Exception\LogicException * @expectedExceptionMessage The publishable_key, secret_key fields are required. */ public function shouldThrowIfRequiredOptionsNotPassed() { $factory = new StripeJsGatewayFactory(); $factory->create(); }
/** * @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'])); }