Skip to content

Commit 6d15221

Browse files
bshafferTakashi Matsuo
authored andcommitted
update analytics sample for env:flex (GoogleCloudPlatform#210)
1 parent d955b1b commit 6d15221

File tree

3 files changed

+37
-3
lines changed

3 files changed

+37
-3
lines changed

appengine/flexible/analytics/app.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
runtime: php
2-
vm: true
2+
env: flex
33

44
runtime_config:
5-
document_root: web
5+
document_root: web
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
/**
3+
* Copyright 2016 Google Inc.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
namespace Google\Cloud\Samples\AppEngine\Analytics;
18+
19+
use Google\Cloud\TestUtils\AppEngineDeploymentTrait;
20+
21+
class DeployTest extends \PHPUnit_Framework_TestCase
22+
{
23+
use AppEngineDeploymentTrait;
24+
25+
public function testIndex()
26+
{
27+
// Access the modules app top page.
28+
$resp = $this->client->get('/');
29+
$this->assertEquals('200', $resp->getStatusCode(),
30+
'top page status code');
31+
$this->assertContains('returned 200', (string) $resp->getBody(),
32+
'top page content');
33+
}
34+
}

appengine/flexible/analytics/tests/LocalTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
namespace Google\Cloud\Test;
17+
namespace Google\Cloud\Samples\AppEngine\Analytics;
1818

1919
use Silex\WebTestCase;
2020

0 commit comments

Comments
 (0)