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

Commit

Permalink
Merge branch 'release/v5'
Browse files Browse the repository at this point in the history
  • Loading branch information
biscolab committed Jan 15, 2022
2 parents 519419f + c051e11 commit 30175f1
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
28 changes: 28 additions & 0 deletions bin/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

set -e

# name=$([ "$1" ] && echo "$1" || echo default)
version="7.4"
declare -a versions=("7.3" "7.4" "8.0")

if [[ " ${versions[*]} " == *"$1"* ]];
then
version="$1"
else
echo "PHP version '$1' is not supported."
IFS=', ';echo "We suggest to select one of the following options: ${versions[*]}"
echo "Test will run using default version $version"
fi

echo $version

# for version in "${versions[@]}"
# do
docker run -it --rm \
-e "TERM=xterm-256color" \
-v "$PWD":/usr/src \
-w /usr/src \
php:"$version"-cli-alpine \
vendor/bin/phpunit
# done
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "biscolab/laravel-recaptcha",
"description": "Simple and painless Google reCAPTCHA package for Laravel framework",
"version": "5.1.0",
"version": "5.2.0",
"license": "MIT",
"type": "library",
"keywords": [
Expand Down
9 changes: 9 additions & 0 deletions src/ReCaptchaBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,4 +383,13 @@ protected function returnArray(): bool

return ($this->version == 'v3');
}

/**
* @return string
*/
public function getOnLoadCallback(): string
{

return "";
}
}
2 changes: 1 addition & 1 deletion tests/ReCaptchaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function testSkipByIpAndReturnArrayReturnsDefaultArray()
/**
* @test
*/
public function testSlipByIpReturnsValidResponse()
public function testSkipByIpReturnsValidResponse()
{

$this->setSkipByIp($this->recaptcha_invisible, true);
Expand Down

0 comments on commit 30175f1

Please sign in to comment.