2022-09-20 21:59:52 +02:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2024-09-24 12:16:20 +02:00
|
|
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" bootstrap="vendor/autoload.php" colors="true">
|
|
|
|
|
<testsuites>
|
|
|
|
|
<testsuite name="Unit">
|
|
|
|
|
<directory suffix="Test.php">./tests/Unit</directory>
|
|
|
|
|
</testsuite>
|
|
|
|
|
<testsuite name="Feature">
|
|
|
|
|
<directory suffix="Test.php">./tests/Feature</directory>
|
|
|
|
|
</testsuite>
|
|
|
|
|
<!-- <testsuite name="Browser">-->
|
|
|
|
|
<!-- <directory suffix="Test.php">./tests/Browser</directory>-->
|
|
|
|
|
<!-- </testsuite>-->
|
|
|
|
|
</testsuites>
|
|
|
|
|
<php>
|
|
|
|
|
<env name="APP_KEY" value="AckfSECXIvnK5r28GVIWUAxmbBSjTsmF"/>
|
|
|
|
|
<env name="APP_ENV" value="testing"/>
|
|
|
|
|
<env name="BCRYPT_ROUNDS" value="4"/>
|
|
|
|
|
<env name="CACHE_DRIVER" value="array"/>
|
|
|
|
|
<env name="DB_FOREIGN_KEYS" value="(false)"/>
|
|
|
|
|
<env name="MAIL_MAILER" value="log"/>
|
|
|
|
|
<env name="MAIL_FROM_ADDRESS" value="notifications@notionforms.io"/>
|
|
|
|
|
<env name="MAIL_FROM_NAME" value="NotionForms"/>
|
|
|
|
|
<env name="QUEUE_CONNECTION" value="sync"/>
|
|
|
|
|
<env name="SESSION_DRIVER" value="array"/>
|
|
|
|
|
<env name="SELF_HOSTED" value="false"/>
|
|
|
|
|
<env name="TEMPLATE_EDITOR_EMAILS" value="admin@opnform.com"/>
|
|
|
|
|
<env name="JWT_SECRET" value="9K6whOetAFaokQgSIdbMQZuJuDV5uS2Y"/>
|
|
|
|
|
<env name="STRIPE_KEY" value="TEST_KEY"/>
|
|
|
|
|
<env name="STRIPE_SECRET" value="TEST_SECRET"/>
|
Email spam security (#641)
* Add hCaptcha on register page
* register page captcha test cases
* Refactor integration validation rules to include form context
- Updated the `getValidationRules` method in various integration handlers (Discord, Email, Google Sheets, Slack, Webhook, Zapier) to accept an optional `Form` parameter, allowing for context-aware validation.
- Enhanced the `EmailIntegration` handler to enforce restrictions based on user plans, ensuring free users can only create one email integration per form and can only send to a single email address.
- Added a new test suite for `EmailIntegration` to validate the new restrictions and ensure proper functionality for both free and pro users.
- Introduced loading state management in the `IntegrationModal` component to improve user experience during save operations.
These changes improve the flexibility and user experience of form integrations, particularly for email handling.
* for self-hosted ignore emil validation for spam
* fix pint
* ignore register throttle for testing env
* support new migration for mysql also
* Register page captcha enable if captcha key set
* fix test case
* fix test case
* fix test case
* fix pint
* Refactor RegisterController middleware and update TestCase setup
- Removed environment check for throttling middleware in RegisterController, ensuring consistent rate limiting for the registration endpoint.
- Updated TestCase to disable throttle middleware during tests, allowing for more flexible testing scenarios without rate limiting interference.
* Enhance hCaptcha integration in tests and configuration
- Added hCaptcha site and secret keys to phpunit.xml for testing purposes.
- Updated RegisterTest to configure hCaptcha secret key dynamically, ensuring proper token validation in production environment.
These changes improve the testing setup for hCaptcha, facilitating more accurate simulation of production conditions.
---------
Co-authored-by: Julien Nahum <julien@nahum.net>
2024-12-18 13:16:27 +01:00
|
|
|
<env name="H_CAPTCHA_SITE_KEY" value="TEST_SITE_KEY"/>
|
|
|
|
|
<env name="H_CAPTCHA_SECRET_KEY" value="TEST_SECRET"/>
|
2024-09-24 12:16:20 +02:00
|
|
|
</php>
|
|
|
|
|
<source>
|
|
|
|
|
<include>
|
|
|
|
|
<directory suffix=".php">./app</directory>
|
|
|
|
|
</include>
|
|
|
|
|
</source>
|
2022-09-20 21:59:52 +02:00
|
|
|
</phpunit>
|