aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/unit/includes/libs/SamplingStatsdClientTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/unit/includes/libs/SamplingStatsdClientTest.php')
-rw-r--r--tests/phpunit/unit/includes/libs/SamplingStatsdClientTest.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/phpunit/unit/includes/libs/SamplingStatsdClientTest.php b/tests/phpunit/unit/includes/libs/SamplingStatsdClientTest.php
index 7bd161156dcf..6de10c0337b5 100644
--- a/tests/phpunit/unit/includes/libs/SamplingStatsdClientTest.php
+++ b/tests/phpunit/unit/includes/libs/SamplingStatsdClientTest.php
@@ -15,10 +15,10 @@ class SamplingStatsdClientTest extends PHPUnit\Framework\TestCase {
*/
public function testSampling( $data, $sampleRate, $seed, $expectWrite ) {
$sender = $this->getMockBuilder( SenderInterface::class )->getMock();
- $sender->expects( $this->any() )->method( 'open' )->will( $this->returnValue( true ) );
+ $sender->method( 'open' )->willReturn( true );
if ( $expectWrite ) {
$sender->expects( $this->once() )->method( 'write' )
- ->with( $this->anything(), $this->equalTo( $data ) );
+ ->with( $this->anything(), $data );
} else {
$sender->expects( $this->never() )->method( 'write' );
}
@@ -62,9 +62,9 @@ class SamplingStatsdClientTest extends PHPUnit\Framework\TestCase {
$nonMatching->setValue( 1 );
$sender = $this->getMockBuilder( SenderInterface::class )->getMock();
- $sender->expects( $this->any() )->method( 'open' )->will( $this->returnValue( true ) );
- $sender->expects( $this->once() )->method( 'write' )->with( $this->anything(),
- $this->equalTo( $nonMatching ) );
+ $sender->method( 'open' )->willReturn( true );
+ $sender->expects( $this->once() )->method( 'write' )
+ ->with( $this->anything(), $nonMatching );
$client = new SamplingStatsdClient( $sender );
$client->setSamplingRates( [ 'foo.*' => 0.2 ] );