Skip to content

Commit c3c3bfb

Browse files
authored
Import kml data from string (#7)
* Adding Behat acceptance testing * Integrating acceptance test on ci * Refactoring domain objects * Improving feature writing * Improving design * Implementing element parsers * Fixing errors in tests * Implementing overlays * Implementing parsers
1 parent 96be188 commit c3c3bfb

175 files changed

Lines changed: 6255 additions & 873 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ php:
33
- 7.1
44
before_script:
55
- composer install
6-
script: composer test
6+
script:
7+
- composer test-ci
8+
- composer acceptance-test-ci
79
after_success:
810
- curl -s https://codecov.io/bash | bash

README.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,28 @@ A php library to manipulate KML/KMZ files.
88

99
php-libKML maps KML/KMZ data into proper objects that follows the KML specification. The purpose of the library is create KML file from code, parse KML files and convert to another formats maintaining the complete KML information.
1010

11+
KML documentation
12+
1113
## Features ##
1214

1315
* KML schema version 2.2
14-
* PHP 7.0+
16+
* PHP 7.1+
17+
* Composer integration
1518
* Object oriented design
1619
* Comprehensive KML model
20+
* Import
21+
* KML
22+
23+
Pending features:
24+
1725
* Google extensions support
26+
* Import
27+
* KMZ
28+
* GeoJson
29+
* Export
30+
* KML/KMZ
31+
* GeoJson
32+
* WKT
1833

1934
## Installation ##
2035

@@ -26,16 +41,20 @@ composer require earelin/php-libkml:^2.0.0
2641

2742
## Usage ##
2843

29-
30-
3144
## Contribute ##
3245

33-
Execute tests
46+
Execute unit tests
3447

3548
```bash
3649
composer test
3750
```
3851

52+
Execute acceptance tests
53+
54+
```bash
55+
composer acceptance-test
56+
```
57+
3958
Check code quality with Codesniffer
4059

4160
```bash

behat.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
default:
2+
suites:
3+
parser:
4+
contexts:
5+
- LibKml\Tests\Bdd\Read\Kml\ParserKmlContext
6+
extensions:
7+
LeanPHP\Behat\CodeCoverage\Extension:
8+
drivers:
9+
- local
10+
filter:
11+
whitelist:
12+
include:
13+
directories:
14+
'src': ~
15+
report:
16+
format: clover
17+
options:
18+
target: reports/behat-coverage.xml

composer.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@
1313
"minimum-stability": "dev",
1414
"prefer-stable": true,
1515
"require": {
16-
"php": "^7.1"
16+
"php": "^7.1",
17+
"ext-simplexml": "*"
1718
},
1819
"require-dev": {
1920
"phpunit/phpunit": "^7.4",
20-
"drupal/coder": "^8.2.12"
21+
"drupal/coder": "^8.2.12",
22+
"behat/behat": "^3.5",
23+
"leanphp/behat-code-coverage": "^3.4"
2124
},
2225
"autoload": {
2326
"psr-4": {
@@ -30,8 +33,11 @@
3033
}
3134
},
3235
"scripts": {
33-
"clean": "rm -Rf reports vendor",
34-
"test": "phpunit --bootstrap vendor/autoload.php -c phpunit.xml",
36+
"clean": "rm -Rf reports",
37+
"test": "phpunit --colors=always --bootstrap vendor/autoload.php -c phpunit.xml",
38+
"test-ci": "phpunit --colors=never --bootstrap vendor/autoload.php -c phpunit.xml",
39+
"acceptance-test": "behat --colors --no-snippets",
40+
"acceptance-test-ci": "behat --no-colors --no-snippets --format junit --out reports",
3541
"phpcs": "phpcs --bootstrap=vendor/autoload.php --standard=vendor/drupal/coder/coder_sniffer/Drupal --exclude=Drupal.Commenting.FunctionComment src",
3642
"phpcbf": "phpcbf --bootstrap=vendor/autoload.php --standard=vendor/drupal/coder/coder_sniffer/Drupal --exclude=Drupal.Commenting.FunctionComment,Drupal.Commenting.ClassComment src"
3743
}

0 commit comments

Comments
 (0)