Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't parse any of the test files #9

Closed
nivv opened this issue Oct 16, 2017 · 2 comments
Closed

Can't parse any of the test files #9

nivv opened this issue Oct 16, 2017 · 2 comments

Comments

@nivv
Copy link

nivv commented Oct 16, 2017

I've been looking for a way to parse BGC-files and found this package. However none of the test files work. When trying the new format this is the error I get

[byrokrat\autogiro\Exception\ContentException] Tree invalid due to the following issues:
Parser: Syntax error, expecting '01', REQ_OPENING_RECORD, REQ_MANDATE_LAYOUT, REQ_PAYMENT_LAYOUT, REQ_AMENDMENT_LAYOUT, REQUEST_FILE, '01', RESP_MANDATE_OPENING_OLD_RECORD, '01', GENERIC_OPENING_RECORD, RESP_MANDATE_FILE, FILE on line 1

If I remove the following from the test file:

[---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8

I get below error instead

[byrokrat\autogiro\Exception\ContentException] Tree invalid due to the following issues:
Parser: Syntax error, expecting ALPHA-NUMERIC on line 1

Steps to reproduce

  1. Download zip

  2. Add a testfile

<?php
require_once('vendor/autoload.php');
$factory = new \byrokrat\autogiro\Parser\ParserFactory;
$parser = $factory->createParser();
$fileNode = $parser->parse(file_get_contents('tests/ny_layout/autogiro_exempelfil_bet-spec-o-tk_sv.txt'));
@hanneskod
Copy link
Member

Yupp, the files under tests don't parse. This is still work in progress. Autogirot contains many diffrent file layouts, at the moment this package can parse mandate requests and reponses and transaction requests. These tests can be found in the features dir and are executed with behat.

The testfiles under tests are downloaded from bgc.se and will be moved to proper feature tests as more layouts are supported.

The current timeframe is to add support for all major layouts during this winter...

Is there a layout you are specifically interested in?

@hanneskod
Copy link
Member

Closing as there has been no development...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants