Skip to content

MFTF 2.4.0 - Merge develop to master #346

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

Merged
merged 129 commits into from
Apr 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
f98c8e2
Update requirements to include php7.3 support
pmclain Dec 28, 2018
9812c6b
Skip coverage check on php 7.3
pmclain Dec 28, 2018
9e180fe
MQE-1428: CLI command.php treats argument "0" as null
jilu1 Feb 12, 2019
a5afd2b
MQE-1447: Remove notice on empty page module
KevinBKozan Feb 14, 2019
7609658
Merge pull request #1 from magento/develop
dshevtsov Mar 5, 2019
2a8c17a
Adding docs folder.
dobooth Mar 5, 2019
7f0207a
Change a lot of code as we move MFTF docs to new repo.
dobooth Mar 6, 2019
0698d92
Updated images to markdown.
dobooth Mar 6, 2019
705236c
Replaced {% raw %} blocks.
dobooth Mar 7, 2019
540a3b5
Removed version note.
dobooth Mar 7, 2019
758de90
Fixed hrefs that pointed to mftf/2.3/ path.
dobooth Mar 7, 2019
f6efc8c
<span> to <div> since the latter is block element.
dobooth Mar 7, 2019
5facbb3
Close %raw% tag.
dobooth Mar 7, 2019
70fe5a7
Dupe %raw% tag removed.
dobooth Mar 7, 2019
b7dd56b
Fixing links and HTML.
dobooth Mar 8, 2019
5a9b559
Small fixes.
dobooth Mar 8, 2019
32f36fa
Merge branch 'develop' into MQE-1428
jilu1 Mar 12, 2019
c7e17b9
Adding CODEOWNERS file for git review control.
dobooth Mar 12, 2019
537ffe8
Move to hidden folder.
dobooth Mar 12, 2019
db370cf
Merge pull request #307 from magento/MQE-1428
jilu1 Mar 13, 2019
b6c28b3
Reduce cyclomatic complexity for OperationDefinitionObjectHandler::in…
Mar 16, 2019
9ba5d05
Reduce cyclomatic complexity for OperationDataArrayResolver::resolveO…
Mar 16, 2019
76a4c58
Add files.
dobooth Mar 18, 2019
26df2fa
Merge branch 'develop' into db_mftfdocs
okolesnyk Mar 19, 2019
79c2af9
MQE-1472: Action Group context in Tests and Allure
KevinBKozan Mar 19, 2019
f901e4f
Adding merge point docs.
dobooth Mar 19, 2019
cd42bf6
MQE-1472: Action Group context in Tests and Allure
KevinBKozan Mar 19, 2019
98e1075
add description for newely created methods, fix issues catched by cod…
Mar 20, 2019
de0b3fe
MQE-1472: Action Group context in Tests and Allure
KevinBKozan Mar 20, 2019
551e925
Switched .md links to .html
dobooth Mar 20, 2019
cb395ff
Merge pull request #2 from magento-devdocs/db_MFTF_extensionpoints
dobooth Mar 20, 2019
d952d0c
Fixed codeception paths.
dobooth Mar 20, 2019
ac14389
Merge branch 'db_mftfdocs' of github.com:magento-devdocs/magento2-fun…
dobooth Mar 20, 2019
cb5a2ba
Added flag per Pangolins
dobooth Mar 20, 2019
4155652
MQE-1224: Remove fillSecretField from Test Schema
tomreece Mar 21, 2019
4fc3430
Merge pull request #316 from magento-devdocs/db_mftfdocs
okolesnyk Mar 21, 2019
766efcc
Fixing links and other changes per review.
dobooth Mar 21, 2019
fedf28e
MQE-1472: Action Group context in Tests and Allure
KevinBKozan Mar 22, 2019
6ddc2b6
Merge branch 'develop' into issue-59-reduce-cyclomatic-complexity
KevinBKozan Mar 22, 2019
24723b5
Merge pull request #318 from sergeynezbritskiy/issue-59-reduce-cyclom…
KevinBKozan Mar 22, 2019
ecf4014
Merge branch 'develop' into db_mftfrepo
dobooth Mar 22, 2019
70bfb68
Added {% raw %} .
dobooth Mar 22, 2019
1b5b469
Merge branch 'db_mftfrepo' of github.com:magento-devdocs/magento2-fun…
dobooth Mar 22, 2019
380debe
Fixed bad raw tags.
dobooth Mar 22, 2019
685bda2
raw failure is what this is.
dobooth Mar 22, 2019
07d7100
Merge branch 'develop' into MQE-1479
KevinBKozan Mar 25, 2019
72c1367
MQE-1479: PHP 7.3 Support
KevinBKozan Mar 25, 2019
a039d1d
Merge pull request #322 from magento/MQE-1479
KevinBKozan Mar 25, 2019
c669bd5
Merge branch 'develop' into db_mftfrepo
dobooth Mar 26, 2019
c0d491c
MQE-1439: Invalid XML character in AdminDateFormatOnAttributePageTest…
tomreece Mar 27, 2019
0dc417b
MQE-1439: Invalid XML character in AdminDateFormatOnAttributePageTest…
tomreece Mar 27, 2019
44aecc6
Merge pull request #321 from magento-devdocs/db_mftfrepo
tomreece Mar 28, 2019
00caa60
MQE-1376: [SPIKE] Investigate Self-Documentation for MFTF
aljcalandra Mar 28, 2019
e0713ef
MQE-1376: [SPIKE] Investigate Self-Documentation for MFTF
aljcalandra Mar 29, 2019
a22bd04
MQE-1376: [SPIKE] Investigate Self-Documentation for MFTF
aljcalandra Mar 29, 2019
995aa18
MQE-1376: [SPIKE] Investigate Self-Documentation for MFTF
aljcalandra Mar 29, 2019
7f82e4d
MQE-810: Create a static test to validate references between modules
KevinBKozan Mar 29, 2019
e28d1c5
Merge branch 'develop' into MQE-1447
KevinBKozan Apr 1, 2019
45637c1
[ImgBot] Optimize images
ImgBotApp Apr 1, 2019
a48933c
Merge pull request #3 from magento-devdocs/imgbot
dobooth Apr 2, 2019
ee5d3f7
Merge pull request #309 from magento/MQE-1447
KevinBKozan Apr 5, 2019
e1b23aa
Fixed broken link and abstracted the others.
dobooth Apr 5, 2019
22ef62f
Fixed misspelling.
dobooth Apr 5, 2019
f759a69
Alphabetized link defs.
dobooth Apr 8, 2019
e95df3f
Merge branch 'develop' into MQE-1472
KevinBKozan Apr 9, 2019
5024162
Merge branch 'develop' into MQE-1224
tomreece Apr 9, 2019
50bfbc5
Merge branch 'develop' into MQE-1439
tomreece Apr 9, 2019
f8cf2c3
Merge pull request #319 from magento/MQE-1472
KevinBKozan Apr 9, 2019
e2b7068
Merge branch 'develop' into MQE-1224
tomreece Apr 9, 2019
6d0cde4
Merge pull request #320 from magento/MQE-1224
tomreece Apr 9, 2019
8c450b7
Merge branch 'develop' into MQE-1439
tomreece Apr 9, 2019
c6697d9
Merge pull request #323 from magento/MQE-1439
tomreece Apr 9, 2019
9533f29
Merge branch 'develop' into db_4169_skip
dobooth Apr 10, 2019
5e0238a
magento-pangolin/magento2-functional-testing-framework#MQE-1456: The …
ivy00johns Apr 11, 2019
db1a94b
Merge pull request #328 from magento-devdocs/db_4169_skip
KevinBKozan Apr 11, 2019
71ade8d
Merge branch 'develop' into db_img_bot
KevinBKozan Apr 11, 2019
5c40838
Merge pull request #326 from magento-devdocs/db_img_bot
tomreece Apr 12, 2019
a31e715
Merge branch 'develop' into db_4171_sensitive
dobooth Apr 12, 2019
9305d6f
executeInSelenium generation fix
zakdma Apr 15, 2019
4a6d39d
MQE-1376: [SPIKE] Investigate Self-Documentation for MFTF
aljcalandra Apr 15, 2019
37406e7
Merge branch 'develop' into MQE-1456-amOnPage-Always-Waits
ivy00johns Apr 15, 2019
9b5d79c
Merge pull request #327 from magento-devdocs/db_4171_sensitive
tomreece Apr 15, 2019
6235795
MQE-1367: [SPIKE] Investigate Self-Documentation for MFTF
aljcalandra Apr 15, 2019
8691c9b
MQE-1376: [SPIKE] Investigate Self-Documentation for MFTF
aljcalandra Apr 16, 2019
ac7c82f
Added Nginx specific settings
vovsky Apr 17, 2019
a070a32
magento-pangolin/magento2-functional-testing-framework#MQE-1457: [PWA…
ivy00johns Apr 17, 2019
2c84791
magento-pangolin/magento2-functional-testing-framework#MQE-1457: [PWA…
ivy00johns Apr 18, 2019
bd990cc
Merge branch 'develop' into MQE-1457
ivy00johns Apr 18, 2019
b5f6488
MQE-1376: [SPIKE] Investigate Self-Documentation for MFTF
aljcalandra Apr 18, 2019
9dfc09b
Merge branch 'develop' into executeInSelenium
zakdma Apr 19, 2019
df4ad99
Merge branch 'develop' into MQE-1376
KevinBKozan Apr 19, 2019
5f0bdd3
Merge branch 'develop' into MQE-1376
KevinBKozan Apr 19, 2019
97bc416
Merge branch 'develop' into MQE-1456-amOnPage-Always-Waits
ivy00johns Apr 19, 2019
24ac1d9
Merge pull request #334 from magento/MQE-1457
ivy00johns Apr 19, 2019
8d63600
Merge branch 'develop' into MQE-1456-amOnPage-Always-Waits
ivy00johns Apr 19, 2019
2f706cc
Merge branch 'develop' into MQE-1376
KevinBKozan Apr 19, 2019
c9dd418
Merge pull request #330 from magento/MQE-1456-amOnPage-Always-Waits
ivy00johns Apr 19, 2019
26fa3ce
Merge branch 'develop' into MQE-1376
KevinBKozan Apr 22, 2019
ef1cab0
Added two new tips.
dobooth Apr 22, 2019
a9a3a48
Merge branch 'develop' into db_tipstricks
dobooth Apr 22, 2019
062acd0
Remove temprepo.
dobooth Apr 22, 2019
31cc212
Fixed link.
dobooth Apr 22, 2019
304b7ea
Merge branch 'develop' into getting-started-nginx-config
jilu1 Apr 22, 2019
8af7dc4
Merge pull request #333 from vovsky/getting-started-nginx-config
jilu1 Apr 22, 2019
a766d44
Merge branch 'develop' into MQE-1376
KevinBKozan Apr 22, 2019
a86f010
Merge pull request #324 from magento/MQE-1376
KevinBKozan Apr 22, 2019
2ec9806
executeInSelenium generation fix
zakdma Apr 22, 2019
3e63818
Merge branch 'develop' into executeInSelenium
zakdma Apr 22, 2019
a8a1e79
Fixed typo.
dobooth Apr 23, 2019
0ba28dd
Merge branch 'develop' into db_tipstricks
dobooth Apr 23, 2019
d4581b4
#337: return the exit codes of the processes run within the command
powli Apr 24, 2019
4317cc7
Merge pull request #332 from zakdma/executeInSelenium
jilu1 Apr 24, 2019
d7ea51d
#337: adjust type annotations, ensoure integer return type in all ins…
powli Apr 24, 2019
ea5c197
Merge branch 'develop' into develop
powli Apr 24, 2019
48a4a56
MQE-810: Create a static test to validate references between modules
KevinBKozan Apr 24, 2019
55c067e
Merge branch 'develop' into db_tipstricks
tomreece Apr 24, 2019
14face7
Formatting and ordering.
dobooth Apr 24, 2019
7a89cff
MQE-1534: MFTF not including flaky test retries in Allure Report
KevinBKozan Apr 24, 2019
f6b64c8
Merge pull request #338 from netresearch/develop
KevinBKozan Apr 24, 2019
f4f2953
Merge branch 'develop' into MQE-810-DOCS
KevinBKozan Apr 24, 2019
6f8b33e
Merge branch 'develop' into db_tipstricks
tomreece Apr 24, 2019
31adf3c
Merge pull request #341 from magento/MQE-810-DOCS
KevinBKozan Apr 25, 2019
b17e99b
Merge branch 'develop' into db_tipstricks
KevinBKozan Apr 25, 2019
38e5a69
Merge pull request #335 from magento-devdocs/db_tipstricks
KevinBKozan Apr 25, 2019
59831de
Merge branch 'develop' into MQE-1534
KevinBKozan Apr 25, 2019
4f7649e
Merge pull request #344 from magento/MQE-1534
KevinBKozan Apr 25, 2019
8053e58
MQE-1529: Add release to CHANGELOG.MD
KevinBKozan Apr 26, 2019
9416142
MQE-1529: Add release to CHANGELOG.MD
KevinBKozan Apr 29, 2019
9359af2
Merge pull request #345 from magento/MQE-1529
KevinBKozan Apr 29, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# CODEOWNERS file for /docs/ folder.
# Forces a review from other writers for anything within /docs/.
/docs/ @magento/devdocs-admins
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Label| Description
[create issue]: https://help.github.com/articles/creating-an-issue/
[create pr]: https://help.github.com/articles/creating-a-pull-request/
[Definition of Done]: https://devdocs.magento.com/guides/v2.2/contributor-guide/contributing_dod.html
[devdocs]: https://github.com/magento/devdocs/blob/master/.github/CONTRIBUTING.md
[devdocs]: https://github.com/magento/devdocs/blob/master/.github/CONTRIBUTING.html
[existing issues]: https://github.com/magento/magento2-functional-testing-framework/issues?q=is%3Aopen+is%3Aissue
[existing PRs]: https://github.com/magento/magento2-functional-testing-framework/pulls?q=is%3Aopen+is%3Apr
[GitHub documentation]: https://help.github.com/articles/syncing-a-fork
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ codeception.yml
dev/tests/functional/MFTF.suite.yml
dev/tests/functional/_output
dev/mftf.log
dev/tests/mftf.log
dev/tests/mftf.log
dev/tests/docs/*
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ php:
- 7.0
- 7.1
- 7.2
- 7.3
install: composer install --no-interaction --prefer-source
env:
matrix:
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
Magento Functional Testing Framework Changelog
================================================

2.4.0
-----
### Enhancements
* Maintainability
* Added new `mftf static-checks` command to run new static checks against the attached test codebase
* See DevDocs for details
* Added new `mftf generate:docs` command that generates documentation about attached test codebase
* See DevDocs for details
* Traceability
* Allure reports for tests now contain collapsible sections for `actionGroup`s used in execution.

### Fixes
* Fixed an issue where `magentoCli` would treat `argument="0"` as a null value.
* Fixed an issue where `amOnPage` and `waitForPwaElementVisible` would not utilize the `timeout` attribute correctly when MagentoPwaWebDriver is enabled.
* Fixed an issue where invalid XML characters would cause Allure to throw an exception without a resulting report.
* Fixed `codeception.dist.yml` configuration for keeping previous test run results.
* PHP Notices are no longer thrown when XML is missing non-necessary attributes.
* Removed unusable `fillSecretField` action from schema.

### GitHub Issues/Pull requests:
* [#338](https://github.com/magento/magento2-functional-testing-framework/pull/338) -- Return exit codes of process started by 'run:test', 'run:group' or 'run:failed' command
* [#333](https://github.com/magento/magento2-functional-testing-framework/pull/333) -- Added Nginx specific settings to getting started doc
* [#332](https://github.com/magento/magento2-functional-testing-framework/pull/332) -- executeInSelenium action does not generate proper code
* [#318](https://github.com/magento/magento2-functional-testing-framework/pull/318) -- Reduce cyclomatic complexity in Problem Methods
* [#287](https://github.com/magento/magento2-functional-testing-framework/pull/287) -- Update requirements to include php7.3 support

2.3.14
-----
### Enhancements
Expand Down
27 changes: 19 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

## Installation

For the installation guidelines and system requirements, refer to [Getting Started](https://devdocs.magento.com/mftf/2.3/getting-started.html).
For the installation guidelines and system requirements, refer to [Getting Started][].

## Contributing

We would appreciate your contributions to new components or new features, changes to the existing features, tests, documentation, specifications, bug fixes, optimizations, or just good suggestions.
Report about an issue or request features opening a GitHub issue.
Learn more about contributing in our [Contribution Guidelines](.github/CONTRIBUTING.md).
Learn more about contributing in our [Contribution Guidelines][].

If you want to participate in the documentation work, see [DevDocs Contributing](https://github.com/magento/devdocs/blob/master/.github/CONTRIBUTING.md).
If you want to participate in the documentation work, see [DevDocs Contributing][].

### Labels applied by the MFTF team

Expand Down Expand Up @@ -55,15 +55,26 @@ These labels are applied by the MFTF development team to community contributed i

## Reporting security issues

To report security vulnerabilities and other security issues in the Magento software or web sites, send an email with the report at [security@magento.com](mailto:security@magento.com).
To report security vulnerabilities and other security issues in the Magento software or web sites, send an email with the report at [security@magento.com][].
Do not report security issues using GitHub.
Be sure to encrypt your e-mail with our [encryption key](https://info2.magento.com/rs/magentoenterprise/images/security_at_magento.asc) if it includes sensitive information.
Learn more about reporting security issues [here](https://magento.com/security/reporting-magento-security-issue).
Be sure to encrypt your e-mail with our [encryption key][] if it includes sensitive information.
Learn more about reporting security issues [here][].

Stay up-to-date on the latest security news and patches for Magento by signing up for [Security Alert Notifications](https://magento.com/security/sign-up).
Stay up-to-date on the latest security news and patches for Magento by signing up for [Security Alert Notifications][].

## License

Each Magento source file included in this distribution is licensed under AGPL 3.0.

See the license [here](LICENSE_AGPL3.txt) or contact [license@magentocommerce.com](mailto:license@magentocommerce.com) for a copy.
See the license [here][] or contact [license@magentocommerce.com][] for a copy.

<!-- Link Definitions -->
[Getting Started]: docs/getting-started.md
[Contribution Guidelines]: .github/CONTRIBUTING.html
[DevDocs Contributing]: https://github.com/magento/devdocs/blob/master/.github/CONTRIBUTING.md
[security@magento.com]: mailto:security@magento.com
[encryption key]: https://info2.magento.com/rs/magentoenterprise/images/security_at_magento.asc
[here]: https://magento.com/security/reporting-magento-security-issue
[Security Alert Notifications]: https://magento.com/security/sign-up
[here]: LICENSE_AGPL3.txt
[license@magentocommerce.com]: mailto:license@magentocommerce.com
2 changes: 1 addition & 1 deletion bin/mftf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ try {
try {
$application = new Symfony\Component\Console\Application();
$application->setName('Magento Functional Testing Framework CLI');
$application->setVersion('2.3.14');
$application->setVersion('2.4.0');
/** @var \Magento\FunctionalTestingFramework\Console\CommandListInterface $commandList */
$commandList = new \Magento\FunctionalTestingFramework\Console\CommandList;
foreach ($commandList->getCommands() as $command) {
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"name": "magento/magento2-functional-testing-framework",
"description": "Magento2 Functional Testing Framework",
"type": "library",
"version": "2.3.14",
"version": "2.4.0",
"license": "AGPL-3.0",
"keywords": ["magento", "automation", "functional", "testing"],
"config": {
"sort-packages": true
},
"require": {
"php": "7.0.2|7.0.4|~7.0.6|~7.1.0|~7.2.0",
"php": "7.0.2||7.0.4||~7.0.6||~7.1.0||~7.2.0||~7.3.0",
"allure-framework/allure-codeception": "~1.3.0",
"ext-curl": "*",
"codeception/codeception": "~2.3.4 || ~2.4.0 ",
Expand All @@ -25,7 +25,7 @@
"require-dev": {
"squizlabs/php_codesniffer": "~3.2",
"sebastian/phpcpd": "~3.0 || ~4.0",
"brainmaestro/composer-git-hooks": "^2.3",
"brainmaestro/composer-git-hooks": "^2.3.1",
"doctrine/cache": "<1.7.0",
"codeception/aspect-mock": "^3.0",
"goaop/framework": "2.2.0",
Expand Down
19 changes: 10 additions & 9 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions dev/tests/_bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,28 @@
defined('TESTS_BP') || define('TESTS_BP', __DIR__);
defined('TESTS_MODULE_PATH') || define('TESTS_MODULE_PATH', TESTS_BP . $RELATIVE_TESTS_MODULE_PATH);
defined('MAGENTO_BP') || define('MAGENTO_BP', __DIR__);
define('DOCS_OUTPUT_DIR',
FW_BP .
DIRECTORY_SEPARATOR .
"dev" .
DIRECTORY_SEPARATOR .
"tests" .
DIRECTORY_SEPARATOR .
"unit" .
DIRECTORY_SEPARATOR .
"_output"
);
define('RESOURCE_DIR',
FW_BP .
DIRECTORY_SEPARATOR .
"dev" .
DIRECTORY_SEPARATOR .
"tests" .
DIRECTORY_SEPARATOR .
"unit" .
DIRECTORY_SEPARATOR .
"Resources"
);

$utilDir = DIRECTORY_SEPARATOR . 'Util'. DIRECTORY_SEPARATOR . '*.php';

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace tests\unit\Magento\FunctionalTestFramework\Test\Util;

use AspectMock\Test as AspectMock;
use Magento\FunctionalTestingFramework\Test\Util\ActionGroupAnnotationExtractor;
use PHPUnit\Framework\TestCase;
use tests\unit\Util\TestLoggingUtil;

class ActionGroupAnnotationExtractorTest extends TestCase
{
/**
* Before test functionality
* @return void
*/
public function setUp()
{
TestLoggingUtil::getInstance()->setMockLoggingUtil();
}

/**
* Annotation extractor takes in raw array and condenses it to expected format
*
* @throws \Exception
*/
public function testActionGroupExtractAnnotations()
{
// Test Data
$actionGroupAnnotations = [
"nodeName" => "annotations",
"description" => [
"nodeName" => "description",
"value" => "someDescription"
],
"page" => [
"nodeName" => "page",
"value" => "somePage"
]
];
// Perform Test
$extractor = new ActionGroupAnnotationExtractor();
$returnedAnnotations = $extractor->extractAnnotations($actionGroupAnnotations, "fileName");

// Asserts

$this->assertEquals("somePage", $returnedAnnotations['page']);
$this->assertEquals("someDescription", $returnedAnnotations['description']);
}

/**
* Annotation extractor should throw warning when required annotations are missing
*
* @throws \Exception
*/
public function testActionGroupMissingAnnotations()
{
// Action Group Data, missing page and description
$testAnnotations = [];
// Perform Test
$extractor = new ActionGroupAnnotationExtractor();
AspectMock::double($extractor, ['isCommandDefined' => true]);
$extractor->extractAnnotations($testAnnotations, "fileName");

// Asserts
TestLoggingUtil::getInstance()->validateMockLogStatement(
'warning',
'DEPRECATION: Action Group File fileName is missing required annotations.',
[
'actionGroup' => 'fileName',
'missingAnnotations' => "description, page"
]
);
}

/**
* Annotation extractor should not throw warning when required
* annotations are missing if command is not generate:docs
*
* @throws \Exception
*/
public function testActionGroupMissingAnnotationsNoWarning()
{
// Action Group Data, missing page and description
$testAnnotations = [];
// Perform Test
$extractor = new ActionGroupAnnotationExtractor();
$extractor->extractAnnotations($testAnnotations, "fileName");

// Asserts
TestLoggingUtil::getInstance()->validateMockLogEmpty();
}

/**
* After class functionality
* @return void
*/
public static function tearDownAfterClass()
{
TestLoggingUtil::getInstance()->clearMockLoggingUtil();
}
}
Loading