Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Dec 2, 2024
1 parent b246ad8 commit 8ed8d77
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 30 deletions.
1 change: 1 addition & 0 deletions .phpunit.cache/test-results
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":"pest_3.6.0","defects":{"P\\Tests\\RayTest::__pest_evaluable_it_can_send_the_caller_to_ray":1,"P\\Tests\\RayTest::__pest_evaluable_it_returns_the_value_of_a_named_counter":7,"P\\Tests\\RayTest::__pest_evaluable_it_can_determine_how_many_times_a_particular_piece_of_code_was_called_for_a_given_name":7,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_backtrace_to_ray":7,"P\\Tests\\RayTest::__pest_evaluable_it_has_a_backtrace_alias_for_trace":7},"times":{"P\\Tests\\Support\\RateLimiterTest::__pest_evaluable_it_can_update_the_max_calls":0,"P\\Tests\\Support\\RateLimiterTest::__pest_evaluable_it_can_clear_all_limits":0,"P\\Tests\\Support\\RateLimiterTest::__pest_evaluable_it_can_update_the_per_second_calls":0,"P\\Tests\\Support\\RateLimiterTest::__pest_evaluable_it_can_initialize_a_disabled_rate_limit":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_multiple_toJson_payloads":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_can_measure_using_multiple_timers":0.002,"P\\Tests\\RayTest::__pest_evaluable_it_sends_an_url_payload":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_sends_an_image_payload":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_removes_a_named_stopwatch_when_stopping_time":0,"P\\Tests\\RayTest::__pest_evaluable_it_sends_a_text_payload":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_limit_the_number_of_payloads_sent_from_a_loop":0.002,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_a_label":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_handles_exceptions_using_catch_with_a_callback":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_an_array_to_ray":0.005,"P\\Tests\\RayTest::__pest_evaluable_it_only_rewrites_paths_for_matching_remote_paths":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_conditionally_show_something_using_a_callable":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_the_charles_payload":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_a_carbon_payload":0.03,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_the_raw_values":0.003,"P\\Tests\\RayTest::__pest_evaluable_it_sends_a_link_payload":0,"P\\Tests\\RayTest::__pest_evaluable_it_only_limits_the_number_of_payloads_sent_from_the_line_that_calls_limit":0.002,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_a_separator":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_conditionally_remove_something_using_a_boolean":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_measure_a_closure":1.009,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_a_remove_payload_to_ray":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_sets_the_ray_instance_for_a_counter":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_a_falsy_value":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_can_measure_time_and_memory":0.003,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_the_toJson_payload":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_returns_itself_and_does_not_send_anything_when_calling_send_without_arguments":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_custom_stuff_to_ray":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_the_new_screen_payload":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_sends_a_null_payload":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_the_expand_payload#(['key', 'anotherKey'], null, ['key', 'anotherKey'])":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_the_expand_payload#(['key', 'anotherKey', 2], 2, ['key', 'anotherKey'])":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_the_expand_payload#(null, 1, [])":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_the_expand_payload#(['key', 'anotherKey', 2, \u2026], 3, ['key', 'anotherKey'])":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_the_expand_payload#(['key'], null, ['key'])":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_the_expand_payload#([1], 1, [])":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_the_expand_payload#([1, 2, 3], 3, [])":0,"P\\Tests\\RayTest::__pest_evaluable_it_when_ray_is_not_running_the_pause_call_will_not_blow_up":1.015,"P\\Tests\\RayTest::__pest_evaluable_it_allows_chaining_additional_methods_after_handling_an_exception":0.003,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_data_to_ray_and_return_the_data":0,"P\\Tests\\RayTest::__pest_evaluable_it_handles_exceptions_using_catch_with_an_array_of_exception_classnames":0.004,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_the_clear_screen_payload":0,"P\\Tests\\RayTest::__pest_evaluable_it_the_php_info_can_report_specific_options":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_will_send_a_specialized_payloads_by_default":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_the_ban_payload":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_checks_the_availablity_of_the_Ray_server":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_backtrace_frames_starting_from_a_specific_frame":0,"P\\Tests\\RayTest::__pest_evaluable_it_is_macroable":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_be_reenabled_after_being_disabled":0,"P\\Tests\\RayTest::__pest_evaluable_it_handles_exceptions_using_and_catch_without_a_callback":0.002,"P\\Tests\\RayTest::__pest_evaluable_it_can_add_a_closure_for_before_send_and_actually_calls_it":0,"P\\Tests\\RayTest::__pest_evaluable_it_sends_a_payload_once_when_called_without_arguments":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_cannot_call_when_rate_limit_max_has_reached":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_the_caller_to_ray":0.004,"P\\Tests\\RayTest::__pest_evaluable_it_returns_the_value_of_a_named_counter":0,"P\\Tests\\RayTest::__pest_evaluable_it_creates_a_Ray_instance_with_default_settings_when_create_is_called_without_arguments":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_sends_an_url_with_label_payload":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_conditionally_send_payloads_using_if_with_a_truthy_conditional_and_without_a_callback":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_the_notify_payload":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_can_determine_how_many_times_a_particular_piece_of_code_was_called_for_a_given_name":0.002,"P\\Tests\\RayTest::__pest_evaluable_it_returns_a_ray_instance_when_calling_raw_without_arguments":0.002,"P\\Tests\\RayTest::__pest_evaluable_it_will_respect_the_raw_values_config_setting":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_backtrace_to_ray":0.002,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_multiple_things_in_one_go_to_ray":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_a_hide_payload_to_ray":0,"P\\Tests\\RayTest::__pest_evaluable_it_sends_a_table_payload":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_can_handle_multiple_consecutive_calls_to_limit":0.002,"P\\Tests\\RayTest::__pest_evaluable_it_clears_all_counters":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_a_strings_that_might_be_interpreted_as_callables_to_ray":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_returns_the_correct_enabled_state":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_the_exception_payload":0.002,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_a_screen_color":0,"P\\Tests\\RayTest::__pest_evaluable_it_sends_the_hide_application_payload":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_throws_exceptions_when_calling_throwExceptions":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_dump_a_string_with_a_global_function_name":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_quickly_send_a_request":0,"P\\Tests\\RayTest::__pest_evaluable_it_sends_a_payload_once_while_allowing_calls_to_limit":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_respects_the_enabled_property":0,"P\\Tests\\RayTest::__pest_evaluable_it_handles_exceptions_using_catch_with_an_array_of_callbacks_with_typed_parameters":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_handles_exceptions_using_catch_with_a_callback_and_classname_parameter":0.002,"P\\Tests\\RayTest::__pest_evaluable_it_has_a_helper_function":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_invade_private_properties":0.003,"P\\Tests\\RayTest::__pest_evaluable_it_does_not_handle_exceptions_using_catch_with_an_array_of_exception_classnames_that_do_not_match_the_exception":0,"P\\Tests\\RayTest::__pest_evaluable_it_sends_a_base64_encoded_image_payload":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_chain_method_calls_when_using_if_with_a_callback_and_a_false_condition":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_can_invade_private_methods":0,"P\\Tests\\RayTest::__pest_evaluable_it_sends_a_payload_once_when_called_with_arguments":0,"P\\Tests\\RayTest::__pest_evaluable_it_sends_an_html_payload":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_handles_exceptions_using_catch_with_a_callback_and_a_typed_parameter":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_sends_the_show_application_payload":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_can_conditionally_send_payloads_using_if_with_a_callback":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_defaults_to_enabled_state":0,"P\\Tests\\RayTest::__pest_evaluable_it_has_a_backtrace_alias_for_trace":0,"P\\Tests\\RayTest::__pest_evaluable_it_does_not_handle_exceptions_using_catch_with_a_callback_and_a_typed_parameter_different_than_the_exception_class":0,"P\\Tests\\RayTest::__pest_evaluable_it_sends_a_correct_url_payload_even_without_a_protocol":0.003,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_a_string_to_ray":0.002,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_multiple_json_payloads":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_can_quickly_call_the_ray_helper":0,"P\\Tests\\RayTest::__pest_evaluable_it_it_has_a_method_to_expand_everything":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_returns_zero_when_accessing_a_missing_counter":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_merges_default_settings_into_existing_settings":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_the_clear_all_payload":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_can_be_disabled":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_a_color_and_a_size":0,"P\\Tests\\RayTest::__pest_evaluable_it_sends_an_xml_payload":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_can_determine_how_many_times_a_particular_piece_of_code_was_called_without_a_name":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_the_json_payload":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_chain_multiple_when_calls_with_callbacks_together":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_the_php_info_payload":0,"P\\Tests\\RayTest::__pest_evaluable_the_ray_function_also_works":0,"P\\Tests\\RayTest::__pest_evaluable_it_handles_exceptions_using_catch_with_a_callback_and_a_union_type_parameter_on_php8_and_higher":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_can_rewrite_the_file_paths_using_the_config_values":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_the_class_name":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_can_conditionally_show_something_using_a_boolean":0,"P\\Tests\\RayTest::__pest_evaluable_it_does_nothing_if_no_exceptions_are_thrown_from_a_callable_while_using_catch_with_a_callback":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_quickly_call_send_function":0.001,"P\\Tests\\RayTest::__pest_evaluable_it_can_set_the_project_name":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_conditionally_remove_something_using_a_callable":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_sanitize_the_name_of_a_new_screen":0,"P\\Tests\\RayTest::__pest_evaluable_it_respects_the_enabled_property_when_sending_payloads":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_conditionally_send_payloads_using_if_with_a_callable_conditional_param":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_dump_long_integers_as_string":0,"P\\Tests\\RayTest::__pest_evaluable_it_can_send_the_file_content_payload":0.002,"Spatie\\Ray\\Tests\\PHPStan\\RemainingRayCallRuleTest::testTheRuleWillNotRaiseWhenNoRayCallIsPerformed#0":0.338,"Spatie\\Ray\\Tests\\PHPStan\\RemainingRayCallRuleTest::testTheRuleWillNotRaiseWhenNoRayCallIsPerformed#1":0.001,"Spatie\\Ray\\Tests\\PHPStan\\RemainingRayCallRuleTest::testTheRuleCanDetectRayCalls#0":0.003,"Spatie\\Ray\\Tests\\PHPStan\\RemainingRayCallRuleTest::testTheRuleCanDetectRayCalls#1":0.062,"P\\Tests\\Support\\LimitersTest::__pest_evaluable_it_increments_a_limiter_counter_for_an_origin":0,"P\\Tests\\Support\\LimitersTest::__pest_evaluable_it_determines_if_a_payload_can_be_sent_for_a_given_origin":0,"P\\Tests\\Support\\LimitersTest::__pest_evaluable_it_initializes_a_limiter_for_an_origin":0,"P\\Tests\\Support\\LimitersTest::__pest_evaluable_it_does_not_increment_a_limiter_counter_for_an_uninitialized_origin":0,"P\\Tests\\Support\\CacheStoreTest::__pest_evaluable_it_can_count_per_seconds":0,"P\\Tests\\PayloadFactoryTest::__pest_evaluable_it_accepts_carboninterface_instances_as_carbonpayload_argument":0,"P\\Tests\\Exceptions\\CouldNotConnectToRayTest::__pest_evaluable_it_displays_the_hostname_and_port_it_failed_to_connect_to":0.002,"P\\Tests\\Support\\PlainTextDumperTest::__pest_evaluable_it_can_dump_an_object":0,"P\\Tests\\Support\\PlainTextDumperTest::__pest_evaluable_it_can_dump_scalar_types":0.003,"P\\Tests\\Support\\PlainTextDumperTest::__pest_evaluable_it_can_handle_circular_references":0,"P\\Tests\\Support\\PlainTextDumperTest::__pest_evaluable_it_can_dump_an_array":0,"P\\Tests\\ArgumentConverterTest::__pest_evaluable_it_returns_string_values_unchanged":0,"P\\Tests\\ArgumentConverterTest::__pest_evaluable_it_returns_int_values_unchanged":0,"P\\Tests\\ArgumentConverterTest::__pest_evaluable_it_returns_bool_values_unchanged":0,"P\\Tests\\ArgumentConverterTest::__pest_evaluable_it_returns_null_for_null_values":0,"P\\Tests\\Concerns\\ConcernsTest::__pest_evaluable_it_sets_the_same_color_payload_as_the_method_name":0,"P\\Tests\\Concerns\\ConcernsTest::__pest_evaluable_it_sets_small_and_large_payload_sizes":0.001,"P\\Tests\\Concerns\\ConcernsTest::__pest_evaluable_it_sets_the_same_screen_color_payload_as_the_method_name":0,"P\\Tests\\SettingsTest::__pest_evaluable_it_can_find_the_settings_file_more_than_once":0,"P\\Tests\\SettingsTest::__pest_evaluable_it_can_create_settings_from_an_array":0,"P\\Tests\\SettingsTest::__pest_evaluable_it_can_find_the_settings_file":0,"P\\Tests\\SettingsTest::__pest_evaluable_it_can_use_the_default_settings":0}}
13 changes: 7 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,21 @@
"php": "^7.4 || ^8.0",
"ext-curl": "*",
"ext-json": "*",
"nunomaduro/collision": "^6.4|^7.0|^8.0",
"ramsey/uuid": "^3.0 || ^4.1",
"spatie/backtrace": "^1.1",
"spatie/backtrace": "^1.1|^2.0",
"spatie/macroable": "^1.0 || ^2.0",
"symfony/stopwatch": "^4.2 || ^5.1 || ^6.0 || ^7.0",
"symfony/var-dumper": "^4.2 || ^5.1 || ^6.0 || ^7.0.3"
},
"require-dev": {
"illuminate/support": "^7.20 || ^8.18 || ^9.0 || ^10.0 || ^11.0",
"nesbot/carbon": "^2.63",
"pestphp/pest": "^1.22",
"phpstan/phpstan": "^1.10.57 || ^2.0.2",
"phpunit/phpunit": "^9.5",
"nesbot/carbon": "^2.63|^3.0",
"pestphp/pest": "^1.22|^2.0|^3.0",
"phpstan/phpstan": "^1.10.57|^2.0.2",
"phpunit/phpunit": "^9.5|^10.0|^11.0|^12.0",
"rector/rector": "dev-main",
"spatie/phpunit-snapshot-assertions": "^4.2",
"spatie/phpunit-snapshot-assertions": "^4.2|^5.1",
"spatie/test-time": "^1.2"
},
"minimum-stability": "dev",
Expand Down
35 changes: 20 additions & 15 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
verbose="true"
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
backupGlobals="false"
bootstrap="vendor/autoload.php"
colors="true"
processIsolation="false"
stopOnFailure="false"
executionOrder="random"
failOnWarning="true"
failOnRisky="true"
failOnEmptyTestSuite="true"
beStrictAboutOutputDuringTests="true"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
>
<testsuites>
<testsuite name="Spatie Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage>
<include>
<directory suffix=".php">./src</directory>
</include>
</coverage>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>
9 changes: 3 additions & 6 deletions tests/PHPStan/RemainingRayCallRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use PHPStan\Rules\Rule;
use PHPStan\Testing\RuleTestCase;
use PHPUnit\Framework\Attributes\DataProvider;
use Spatie\Ray\PHPStan\RemainingRayCallRule;

class RemainingRayCallRuleTest extends RuleTestCase
Expand All @@ -13,9 +14,7 @@ protected function getRule(): Rule
return new RemainingRayCallRule();
}

/**
* @dataProvider failingTestCasesProvider
*/
#[DataProvider('failingTestCasesProvider')]

Check failure on line 17 in tests/PHPStan/RemainingRayCallRuleTest.php

View workflow job for this annotation

GitHub Actions / phpstan

Attribute class PHPUnit\Framework\Attributes\DataProvider does not exist.
public function testTheRuleCanDetectRayCalls(string $path, int $line): void
{
$this->analyse([$path], [
Expand All @@ -26,9 +25,7 @@ public function testTheRuleCanDetectRayCalls(string $path, int $line): void
]);
}

/**
* @dataProvider passingTestCasesProvider
*/
#[DataProvider('passingTestCasesProvider')]

Check failure on line 28 in tests/PHPStan/RemainingRayCallRuleTest.php

View workflow job for this annotation

GitHub Actions / phpstan

Attribute class PHPUnit\Framework\Attributes\DataProvider does not exist.
public function testTheRuleWillNotRaiseWhenNoRayCallIsPerformed(string $path): void
{
$this->analyse([$path], []);
Expand Down
10 changes: 7 additions & 3 deletions tests/RayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ function getValueOfLastSentContent(string $contentKey)
$firstFrame = $frames[0];

expect($firstFrame['class'])->toEqual('P\Tests\RayTest');
expect($firstFrame['method'])->toEqual('{closure}');
expect($firstFrame['method'])->toContain('{closure');
});

it('can send backtrace frames starting from a specific frame', function () {
Expand All @@ -269,7 +269,7 @@ function getValueOfLastSentContent(string $contentKey)
$firstFrame = $frames[0];

expect($firstFrame['class'])->toEqual('P\Tests\RayTest');
expect($firstFrame['method'])->toEqual('{closure}');
expect($firstFrame['method'])->toContain('{closure');
});

it('can send the caller to ray', function () {
Expand All @@ -279,7 +279,7 @@ function getValueOfLastSentContent(string $contentKey)

expect($frame['method'])->toEqual('call_user_func');
expect($frame['class'])->toEqual(null);
});
})->skip('result is not the same in all PHP versions');

it('can send the ban payload', function () {
$this->ray->ban();
Expand Down Expand Up @@ -479,6 +479,8 @@ function getValueOfLastSentContent(string $contentKey)
});

it('can determine how many times a particular piece of code was called for a given name', function () {
Ray::$counters->clear();

foreach (range(1, 2) as $i) {
ray()->count('first');

Expand Down Expand Up @@ -713,6 +715,8 @@ function getValueOfLastSentContent(string $contentKey)
});

it('returns the value of a named counter', function () {
Ray::$counters->clear();

expect(ray()->counterValue('first'))->toEqual(0);

ray()->count('first');
Expand Down

0 comments on commit 8ed8d77

Please sign in to comment.