/**
  * @test
  *
  * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
  * @expectedExceptionMessage The child node "account_number" at path "foo" must be configured.
  */
 public function thrownIfApiOptionAccountNumberSectionMissing()
 {
     $factory = new PayexPaymentFactory();
     $tb = new TreeBuilder();
     $rootNode = $tb->root('foo');
     $factory->addConfiguration($rootNode);
     $processor = new Processor();
     $processor->process($tb->buildTree(), array(array('obtain_credit_card' => false, 'encryption_key' => 'aKey')));
 }
    /**
     * @test
     *
     * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
     * @expectedExceptionMessage The child node "account_number" at path "foo" must be configured.
     */
    public function thrownIfAccountNumberOptionNotSet()
    {
        $factory = new PayexPaymentFactory;

        $tb = new TreeBuilder();
        $rootNode = $tb->root('foo');

        $factory->addConfiguration($rootNode);

        $processor = new Processor();
        $processor->process($tb->buildTree(), array(array(
            'encryption_key' => 'aKey'
        )));
    }