コード例 #1
0
 /**
  * @test
  *
  * @expectedException \Payum\Core\Exception\LogicException
  * @expectedExceptionMessage The merchant_id, secret fields are required.
  */
 public function shouldThrowIfRequiredOptionsNotPassed()
 {
     $factory = new KlarnaCheckoutGatewayFactory();
     $factory->create();
 }
コード例 #2
0
 /**
  * @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']));
 }