diff --git a/dlp/test/dlpTest.php b/dlp/test/dlpTest.php index 4aa61f378a..c1940cf894 100644 --- a/dlp/test/dlpTest.php +++ b/dlp/test/dlpTest.php @@ -39,7 +39,6 @@ public function testInspectDatastore() 'project' => getenv('GOOGLE_PROJECT_ID'), ]); $this->assertContains('US_MALE_NAME', $output); - $this->assertContains('Very likely', $output); } public function testInspectBigquery() @@ -50,7 +49,6 @@ public function testInspectBigquery() 'project' => getenv('GOOGLE_PROJECT_ID'), ]); $this->assertContains('CREDIT_CARD_NUMBER', $output); - $this->assertContains('Very likely', $output); } public function testInspectFile() diff --git a/error_reporting/test/error_reportingTest.php b/error_reporting/test/error_reportingTest.php index 9afaad5a33..6faffa7d10 100644 --- a/error_reporting/test/error_reportingTest.php +++ b/error_reporting/test/error_reportingTest.php @@ -40,6 +40,11 @@ public static function setUpBeforeClass() } } + public function setUp() + { + $this->eventuallyConsistentRetryCount = 10; + } + public function testReportErrorSimple() { $message = sprintf('Test Report Error Simple (%s)', date('Y-m-d H:i:s')); diff --git a/error_reporting/test/quickstartTest.php b/error_reporting/test/quickstartTest.php index a6af8c7d91..ed5a93d567 100644 --- a/error_reporting/test/quickstartTest.php +++ b/error_reporting/test/quickstartTest.php @@ -24,6 +24,11 @@ class quickstartTest extends PHPUnit_Framework_TestCase { use EventuallyConsistentTestTrait; + public function setUp() + { + $this->eventuallyConsistentRetryCount = 10; + } + public function testQuickstart() { if (!$projectId = getenv('GOOGLE_PROJECT_ID')) { diff --git a/testing/run_test_suite.sh b/testing/run_test_suite.sh index 86c39d23d6..cfbbcb4d99 100755 --- a/testing/run_test_suite.sh +++ b/testing/run_test_suite.sh @@ -23,7 +23,7 @@ FILES_CHANGED=$(git diff --name-only HEAD $(git merge-base HEAD master)) # on a Pull Request, run the whole test suite. if grep -q ^testing\/ <<< "$FILES_CHANGED" || \ grep -qv \/ <<< "$FILES_CHANGED" || \ - [ -e $TRAVIS_PULL_REQUEST_BRANCH ]; then + [ -z "$TRAVIS_PULL_REQUEST_BRANCH" ]; then RUN_ALL_TESTS=1 else RUN_ALL_TESTS=0 diff --git a/vision/src/detect_document_text.php b/vision/src/detect_document_text.php index 3679a299f2..d4d60ad08a 100644 --- a/vision/src/detect_document_text.php +++ b/vision/src/detect_document_text.php @@ -55,7 +55,10 @@ function detect_document_text($projectId, $path) printf('Block text: %s' . PHP_EOL, $block_text); printf('Block bounds:' . PHP_EOL); foreach ($block['boundingBox']['vertices'] as $vertice) { - printf('X: %s Y: %s' . PHP_EOL, $vertice['x'], $vertice['y']); + printf('X: %s Y: %s' . PHP_EOL, + isset($vertice['x']) ? $vertice['x'] : 'N/A', + isset($vertice['y']) ? $vertice['y'] : 'N/A' + ); } printf(PHP_EOL); }