Skip to content

Commit

Permalink
hotfix incorrect YAML attribute name in mobile-app.yml (#6692)
Browse files Browse the repository at this point in the history
* fix(app) fix key `name`

* feat(test) added test to check structure in mobile_apps.yml

Co-authored-by: Tutik Alexsandr <[email protected]>
  • Loading branch information
sanchezzzhak and sanchezzzhak authored Feb 26, 2021
1 parent 3794d7b commit 395f080
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
11 changes: 11 additions & 0 deletions Tests/Parser/Client/MobileAppTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,15 @@ public function getFixtures(): array

return $fixtureData;
}

public function testStructureMobileAppYml(): void
{
$ymlDataItems = Spyc::YAMLLoad(__DIR__ . '/../../../regexes/client/mobile_apps.yml');

foreach ($ymlDataItems as $item) {
$this->assertTrue(\array_key_exists('regex', $item), 'key "regex" not exist');
$this->assertTrue(\array_key_exists('name', $item), 'key "name" not exist');
$this->assertTrue(\array_key_exists('version', $item), 'key "version" not exist');
}
}
}
16 changes: 16 additions & 0 deletions Tests/fixtures/mobile_apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -959,3 +959,19 @@
model: iPhone
os_family: iOS
browser_family: Unknown
-
user_agent: RadioPublic/android-2.2
os:
name: Android
version: ""
platform: ""
client:
type: mobile app
name: RadioPublic
version: "2.2"
device:
type: ""
brand: ""
model: ""
os_family: Android
browser_family: Unknown
2 changes: 1 addition & 1 deletion regexes/client/mobile_apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@

# RadioPublic (https://play.google.com/store/apps/details?id=com.radiopublic.android)
- regex: 'RadioPublic/android-(\d+[\.\d]+)'
ame: 'RadioPublic'
name: 'RadioPublic'
version: '$1'

# Podimo (https://play.google.com/store/apps/details?id=com.podimo)
Expand Down

0 comments on commit 395f080

Please sign in to comment.