public static function setUpBeforeClass() { $path = getenv('GOOGLE_APPLICATION_CREDENTIALS'); self::$hasCredentials = $path && file_exists($path) && filesize($path) > 0; if (self::$hasCredentials) { self::$bigquery = createAuthorizedClient(); self::$projectId = getenv('GOOGLE_PROJECT_ID'); self::$shakespeareQuery = 'SELECT TOP(corpus, 10) as title, COUNT(*) as unique_words ' . 'FROM [publicdata:samples.shakespeare]'; } }