Skip to content
This repository was archived by the owner on Jun 10, 2024. It is now read-only.

Commit 30175f1

Browse files
committed
Merge branch 'release/v5'
2 parents 519419f + c051e11 commit 30175f1

File tree

4 files changed

+39
-2
lines changed

4 files changed

+39
-2
lines changed

bin/test

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# name=$([ "$1" ] && echo "$1" || echo default)
6+
version="7.4"
7+
declare -a versions=("7.3" "7.4" "8.0")
8+
9+
if [[ " ${versions[*]} " == *"$1"* ]];
10+
then
11+
version="$1"
12+
else
13+
echo "PHP version '$1' is not supported."
14+
IFS=', ';echo "We suggest to select one of the following options: ${versions[*]}"
15+
echo "Test will run using default version $version"
16+
fi
17+
18+
echo $version
19+
20+
# for version in "${versions[@]}"
21+
# do
22+
docker run -it --rm \
23+
-e "TERM=xterm-256color" \
24+
-v "$PWD":/usr/src \
25+
-w /usr/src \
26+
php:"$version"-cli-alpine \
27+
vendor/bin/phpunit
28+
# done

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "biscolab/laravel-recaptcha",
33
"description": "Simple and painless Google reCAPTCHA package for Laravel framework",
4-
"version": "5.1.0",
4+
"version": "5.2.0",
55
"license": "MIT",
66
"type": "library",
77
"keywords": [

src/ReCaptchaBuilder.php

+9
Original file line numberDiff line numberDiff line change
@@ -383,4 +383,13 @@ protected function returnArray(): bool
383383

384384
return ($this->version == 'v3');
385385
}
386+
387+
/**
388+
* @return string
389+
*/
390+
public function getOnLoadCallback(): string
391+
{
392+
393+
return "";
394+
}
386395
}

tests/ReCaptchaTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function testSkipByIpAndReturnArrayReturnsDefaultArray()
131131
/**
132132
* @test
133133
*/
134-
public function testSlipByIpReturnsValidResponse()
134+
public function testSkipByIpReturnsValidResponse()
135135
{
136136

137137
$this->setSkipByIp($this->recaptcha_invisible, true);

0 commit comments

Comments
 (0)