Skip to content

Commit

Permalink
[TASK] Add test case for string array key in emconf
Browse files Browse the repository at this point in the history
  • Loading branch information
o-ba committed Dec 18, 2020
1 parent 245c882 commit c771aa5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/Unit/Fixtures/EmConf/emconf_valid_string_array_key.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

$EM_CONF['my_extension'] = [
'title' => 'My extension',
'description' => 'Great extension - everyone needs it',
'category' => 'be',
'author' => 'John Doe',
'author_email' => 'john@acme.com',
'state' => 'stable',
'uploadfolder' => 0,
'clearCacheOnLoad' => 1,
'author_company' => 'ACME Corporation',
'version' => '1.0.0',
'constraints' => [
'depends' => [
'typo3' => '10.0.0-11.99.99',
]
]
];
9 changes: 9 additions & 0 deletions tests/Unit/Validation/EmConfVersionValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,13 @@ public function isValidMatchesVersion(): void
self::assertFalse($subject->isValid('1.2.0'));
self::assertTrue($subject->isValid('1.0.0'));
}

/**
* @test
*/
public function isValidWithStringArrayKey(): void
{
$subject = new EmConfVersionValidator(__DIR__ . '/../Fixtures/EmConf/emconf_valid_string_array_key.php');
self::assertTrue($subject->isValid('1.0.0'));
}
}

0 comments on commit c771aa5

Please sign in to comment.