Files
ECShopX/tests/ShuyunOpenPlatform/ShuyunOpenPlatformTokenCallbackControllerConfigIsolationTest.php
wanghai 058673559c 4.7.0
2026-06-26 19:20:24 +08:00

23 lines
855 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
declare(strict_types=1);
namespace Tests\ShuyunOpenPlatform;
use PHPUnit\Framework\TestCase;
/**
* TC-CALLBACK-DB-05Controller 不得使用全局 config/env 作为回调验签 secret源码契约
*/
class ShuyunOpenPlatformTokenCallbackControllerConfigIsolationTest extends TestCase
{
public function testControllerSourceDoesNotReferenceGlobalAppSecret(): void
{
$path = dirname(__DIR__, 2).'/src/ShuyunOpenPlatformBundle/Http/Controllers/ShuyunOpenPlatformTokenCallbackController.php';
$src = (string) file_get_contents($path);
$this->assertStringNotContainsString("config('shuyun_open_platform.app_secret')", $src);
$this->assertStringNotContainsString('shuyun_open_platform.app_secret', $src);
$this->assertStringNotContainsString('SHUYUN_OPEN_PLATFORM_APP_SECRET', $src);
}
}