Initial commit: CloudOps infrastructure platform

This commit is contained in:
root
2026-04-09 19:58:57 +02:00
commit 1166a52f26
7762 changed files with 839452 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
<?php
declare(strict_types=1);
namespace Mautic\PluginBundle\Tests\Controller;
use Mautic\CoreBundle\Test\MauticMysqlTestCase;
use PHPUnit\Framework\Assert;
use Symfony\Component\HttpFoundation\Request;
class PluginControllerTest extends MauticMysqlTestCase
{
public function testConfigurePluginSuccessValidation(): void
{
$crawler = $this->client->request(Request::METHOD_GET, '/s/plugins/config/Twilio');
$form = $crawler->filter('form')->form();
$form->setValues([
'integration_details' => [
'isPublished' => 0,
'apiKeys' => [
'username' => 'valid_username',
'password' => 'valid_password',
],
],
]);
$this->client->submit($form);
Assert::assertTrue($this->client->getResponse()->isOk());
}
public function testConfigurePluginValidationError(): void
{
$crawler = $this->client->request(Request::METHOD_GET, '/s/plugins/config/Twilio');
$form = $crawler->filter('form')->form();
$form->setValues([
'integration_details' => [
'isPublished' => 1,
'apiKeys' => [
'username' => '',
'password' => 'bbb',
],
],
]);
$crawler = $this->client->submit($form);
Assert::assertStringContainsString('A value is required.', $crawler->filter('#integration_details_apiKeys div')->html());
}
}