Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions dlp/test/dlpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand Down
5 changes: 5 additions & 0 deletions error_reporting/test/error_reportingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down
5 changes: 5 additions & 0 deletions error_reporting/test/quickstartTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')) {
Expand Down
2 changes: 1 addition & 1 deletion testing/run_test_suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion vision/src/detect_document_text.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down