Skip to content
This repository was archived by the owner on Oct 1, 2020. It is now read-only.

Commit df951c7

Browse files
committed
Support running tests in cluster from PhpStorm #77
- Added test for php-fpm container with Xdebug
1 parent b6bb683 commit df951c7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/include/assertions.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ function executeExtendedCommonAssertions()
3939
assertElasticSearchEnabled
4040
assertElasticSearchDisablingWorks
4141
assertElasticSearchEnablingWorks
42+
43+
assertXdebugContainerWorks
4244
}
4345

4446
## Assertions
@@ -542,3 +544,15 @@ function assertRemotePhpWorks()
542544

543545
assertTrue "Remote PHP is not accessible ('php -i' failed to execute over ssh)." '[[ ${remote_php_ini_contents} =~ "PHP License" ]]'
544546
}
547+
548+
function assertXdebugContainerWorks()
549+
{
550+
echo "${blue}## assertXdebugContainerWorks${regular}"
551+
echo "## assertXdebugContainerWorks" >>${current_log_file_path}
552+
553+
cd ${tests_dir}
554+
magento_page_content="$(curl -sL --cookie "XDEBUG_SESSION=PHPSTORM" "${current_magento_base_url}/customer/account/create/")"
555+
pattern="Magento.* All rights reserved."
556+
assertTrue "Account creation page is not accessible when queried with XDEBUG_SESSION cookie. URL: '${current_magento_base_url}/customer/account/create/'" '[[ ${magento_page_content} =~ ${pattern} ]]'
557+
558+
}

0 commit comments

Comments
 (0)