15 private $_application;
22 private $_allowedAreas = [
50 $annotations[
'method'][self::ANNOTATION_NAME]
52 $annotations[
'method'][self::ANNOTATION_NAME]
54 $annotations[
'class'][self::ANNOTATION_NAME]
56 $annotations[
'class'][self::ANNOTATION_NAME]
59 if (
false == in_array($area, $this->_allowedAreas)) {
60 throw new \Magento\Framework\Exception\LocalizedException(
62 'Invalid "@magentoAppArea" annotation, can be "%1" only.',
63 implode(
'", "', $this->_allowedAreas)
76 public function startTest(\PHPUnit\Framework\TestCase $test)
79 if ($this->_application->getArea() !== $area) {
80 $this->_application->reinitialize();
82 if ($this->_application->getArea() !== $area) {
83 $this->_application->loadArea($area);
__construct(\Magento\TestFramework\Application $application)
startTest(\PHPUnit\Framework\TestCase $test)
_getTestAppArea($annotations)