Skip to content

Commit dc5189c

Browse files
committed
added check id
1 parent 3c3d2de commit dc5189c

File tree

1 file changed

+5
-33
lines changed

1 file changed

+5
-33
lines changed

tests/ViewTest.php

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function testView()
2424
$_service = new GoogleReCaptchaV3Service($configStub, $clientStub);
2525
$service = new GoogleReCaptchaV3($_service);
2626

27-
$service->renderOne('contact_us_id', 'contact_us');
27+
$service->renderOne('contact_us_id66', 'contact_us');
2828
$data = $service->init();
2929
$this->assertEquals(null, $data);
3030
}
@@ -43,11 +43,11 @@ public function testView1()
4343
$_service = new GoogleReCaptchaV3Service($configStub, $clientStub);
4444
$service = new GoogleReCaptchaV3($_service);
4545

46-
$service->renderOne('contact_us_id', 'contact_us');
47-
$service->render(['contact_us_id1'=> 'contact_us']);
46+
$service->renderOne('contact_us_id77', 'contact_us');
47+
$service->render(['contact_us_id88'=> 'contact_us']);
4848
$data = $service::$collection;
49-
$this->assertEquals('contact_us',$data['contact_us_id']);
50-
$this->assertEquals('contact_us',$data['contact_us_id1']);
49+
$this->assertEquals('contact_us',$data['contact_us_id77']);
50+
$this->assertEquals('contact_us',$data['contact_us_id88']);
5151
}
5252

5353
public function testView2()
@@ -80,33 +80,5 @@ public function testView2()
8080
$this->assertEquals('en', $data['language']);
8181
}
8282

83-
public function testView4()
84-
{
85-
// Create a stub for the SomeClass class.
86-
$configStub = $this->createMock(ReCaptchaConfigV3::class);
87-
88-
// Configure the stub.
89-
$configStub->method('isServiceEnabled')
90-
->willReturn(true);
91-
92-
$configStub->method('getSiteKey')
93-
->willReturn('test1');
94-
95-
$configStub->method('isInline')
96-
->willReturn(false);
97-
98-
$configStub->method('getLanguage')
99-
->willReturn('en');
100-
101-
$configStub->method('getBackgroundBadgeDisplay')
102-
->willReturn(false);
10383

104-
$clientStub = $this->createMock(GuzzleRequestClient::class);
105-
106-
$_service = new GoogleReCaptchaV3Service($configStub, $clientStub);
107-
$service = new GoogleReCaptchaV3($_service);
108-
$data = $service->prepareData();
109-
$this->assertEquals(false, $data['display']);
110-
$this->assertEquals('test1', $data['publicKey']);
111-
}
11284
}

0 commit comments

Comments
 (0)