LaravelFCM\Response\GroupResponse::numberSuccess PHP Метод

numberSuccess() публичный Метод

Get the number of device reached with success
public numberSuccess ( ) : integer
Результат integer
    public function numberSuccess()
    {
        return $this->numberTokensSuccess;
    }

Usage Example

Пример #1
0
    /**
     * @test
     */
    public function it_construct_a_response_with_partials_failures()
    {
        $notificationKey = "notificationKey";
        $response = new \GuzzleHttp\Psr7\Response(200, [], '{
					"success": 1,
					"failure": 2,
					"failed_registration_ids":[
					   "regId1",
					   "regId2"
					]}');
        $responseGroup = new GroupResponse($response, $notificationKey);
        $this->assertEquals(1, $responseGroup->numberSuccess());
        $this->assertEquals(2, $responseGroup->numberFailure());
        $this->assertCount(2, $responseGroup->tokensFailed());
    }