Fix notices in phpunit

This commit is contained in:
FreeScout
2026-02-22 01:03:32 -08:00
parent 2101f72f4e
commit 619db43999
2 changed files with 5 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.2/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false"> <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.2/phpunit.xsd">
<testsuites> <testsuites>
<testsuite name="Feature"> <testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory> <directory suffix="Test.php">./tests/Feature</directory>
@@ -16,9 +16,9 @@
<env name="QUEUE_DRIVER" value="sync"/> <env name="QUEUE_DRIVER" value="sync"/>
<env name="APP_KEY" value="value_from_phpunit"/> <env name="APP_KEY" value="value_from_phpunit"/>
</php> </php>
<source> <coverage>
<include> <include>
<directory suffix=".php">./app</directory> <directory suffix=".php">./app</directory>
</include> </include>
</source> </coverage>
</phpunit> </phpunit>

View File

@@ -71,6 +71,7 @@ class ConversationChangeCustomerTest extends TestCase
* This is the regression test for the authorization bypass where changeCustomer() * This is the regression test for the authorization bypass where changeCustomer()
* executed unconditionally even when permission checks set an error message. * executed unconditionally even when permission checks set an error message.
*/ */
#[RequiresPhp('>=8.3.0')]
public function testUnauthorizedUserCannotChangeCustomer() public function testUnauthorizedUserCannotChangeCustomer()
{ {
$response = $this->actingAs($this->unprivUser) $response = $this->actingAs($this->unprivUser)
@@ -98,6 +99,7 @@ class ConversationChangeCustomerTest extends TestCase
* Test that an authorized admin user CAN change a conversation's customer. * Test that an authorized admin user CAN change a conversation's customer.
* This ensures the fix does not break normal functionality. * This ensures the fix does not break normal functionality.
*/ */
#[RequiresPhp('>=8.3.0')]
public function testAuthorizedUserCanChangeCustomer() public function testAuthorizedUserCanChangeCustomer()
{ {
$response = $this->actingAs($this->admin) $response = $this->actingAs($this->admin)