From ee13706c27dd43276e156111a2190fe0e6101010 Mon Sep 17 00:00:00 2001 From: Luka Reihl <133642598+lukareihl@users.noreply.github.com> Date: Tue, 31 Oct 2023 14:06:48 +0100 Subject: [PATCH] Replace stdClass with ElementDataDictionary in the data provider to fix undefined property access errors --- tests/SetHeaderTests.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/SetHeaderTests.php b/tests/SetHeaderTests.php index be9f6e9..b026f86 100644 --- a/tests/SetHeaderTests.php +++ b/tests/SetHeaderTests.php @@ -23,6 +23,7 @@ namespace fiftyone\pipeline\core\tests; +use fiftyone\pipeline\core\ElementDataDictionary; use fiftyone\pipeline\core\SetHeaderElement; use fiftyone\pipeline\core\Messages; use fiftyone\pipeline\core\tests\classes\Constants; @@ -37,10 +38,10 @@ class SetHeaderTests extends TestCase public static function provider_testGetResponseHeaderValue() { return array( - array(array("device" => (object) array( "setheaderbrowseraccept-ch" => new AspectPropertyValue(null, Constants::UNKNOWN), "setheaderplatformaccept-ch" => new AspectPropertyValue(null, Constants::UNKNOWN), "setheaderhardwareaccept-ch" => new AspectPropertyValue(null, Constants::UNKNOWN))), ""), - array(array("device" => (object) array( "setheaderbrowseraccept-ch" => new AspectPropertyValue(null, Constants::ACCEPTCH_BROWSER_VALUE))), "SEC-CH-UA,SEC-CH-UA-Full-Version"), - array(array("device" => (object) array( "setheaderplatformaccept-ch" => new AspectPropertyValue(null, Constants::ACCEPTCH_PLATFORM_VALUE), "setheaderhardwareaccept-ch" => new AspectPropertyValue(null, Constants::ACCEPTCH_HARDWARE_VALUE))), "SEC-CH-UA-Model,SEC-CH-UA-Mobile,SEC-CH-UA-Arch,SEC-CH-UA-Platform,SEC-CH-UA-Platform-Version"), - array(array("device" => (object) array( "setheaderbrowseraccept-ch" => new AspectPropertyValue(null, Constants::ACCEPTCH_BROWSER_VALUE), "setheaderplatformaccept-ch" => new AspectPropertyValue(null, Constants::ACCEPTCH_PLATFORM_VALUE), "setheaderhardwareaccept-ch" => new AspectPropertyValue(null, Constants::ACCEPTCH_HARDWARE_VALUE))), "SEC-CH-UA,SEC-CH-UA-Full-Version,SEC-CH-UA-Model,SEC-CH-UA-Mobile,SEC-CH-UA-Arch,SEC-CH-UA-Platform,SEC-CH-UA-Platform-Version") + array(array("device" => new ElementDataDictionary(null, array( "setheaderbrowseraccept-ch" => new AspectPropertyValue(null, Constants::UNKNOWN), "setheaderplatformaccept-ch" => new AspectPropertyValue(null, Constants::UNKNOWN), "setheaderhardwareaccept-ch" => new AspectPropertyValue(null, Constants::UNKNOWN)))), ""), + array(array("device" => new ElementDataDictionary(null, array( "setheaderbrowseraccept-ch" => new AspectPropertyValue(null, Constants::ACCEPTCH_BROWSER_VALUE)))), "SEC-CH-UA,SEC-CH-UA-Full-Version"), + array(array("device" => new ElementDataDictionary(null, array( "setheaderplatformaccept-ch" => new AspectPropertyValue(null, Constants::ACCEPTCH_PLATFORM_VALUE), "setheaderhardwareaccept-ch" => new AspectPropertyValue(null, Constants::ACCEPTCH_HARDWARE_VALUE)))), "SEC-CH-UA-Model,SEC-CH-UA-Mobile,SEC-CH-UA-Arch,SEC-CH-UA-Platform,SEC-CH-UA-Platform-Version"), + array(array("device" => new ElementDataDictionary(null, array( "setheaderbrowseraccept-ch" => new AspectPropertyValue(null, Constants::ACCEPTCH_BROWSER_VALUE), "setheaderplatformaccept-ch" => new AspectPropertyValue(null, Constants::ACCEPTCH_PLATFORM_VALUE), "setheaderhardwareaccept-ch" => new AspectPropertyValue(null, Constants::ACCEPTCH_HARDWARE_VALUE)))), "SEC-CH-UA,SEC-CH-UA-Full-Version,SEC-CH-UA-Model,SEC-CH-UA-Mobile,SEC-CH-UA-Arch,SEC-CH-UA-Platform,SEC-CH-UA-Platform-Version") ); }