Skip to content

Commit

Permalink
fix for php 7.4 strictness
Browse files Browse the repository at this point in the history
  • Loading branch information
dwsupplee committed May 4, 2022
1 parent c35b4c7 commit 9b78aaa
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 1 deletion.
9 changes: 8 additions & 1 deletion BigQuery/tests/Snippet/QueryResultsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,21 @@ public function setUp()
]
];

$job = $this->prophesize(Job::class);
$job->identity()
->willReturn([
'jobId' => 'job',
'projectId' => 'project',
'location' => 'us-west1'
]);
$this->connection = $this->prophesize(ConnectionInterface::class);
$this->qr = TestHelpers::stub(QueryResults::class, [
$this->connection->reveal(),
self::JOB_ID,
self::PROJECT,
$this->info,
new ValueMapper(false),
$this->prophesize(Job::class)->reveal()
$job->reveal()
]);
}

Expand Down
8 changes: 8 additions & 0 deletions Spanner/tests/Snippet/ArrayTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ public function setUp()
$instance->name()->willReturn(InstanceAdminClient::instanceName(self::PROJECT, self::INSTANCE));

$session = $this->prophesize(Session::class);
$session->info()
->willReturn([
'databaseName' => 'database'
]);
$session->name()
->willReturn('database');
$session->setExpiration(Argument::any())
->willReturn(100);

$sessionPool = $this->prophesize(SessionPoolInterface::class);
$sessionPool->acquire(Argument::any())
Expand Down
8 changes: 8 additions & 0 deletions Spanner/tests/Snippet/DatabaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ public function setUp()
$this->checkAndSkipGrpcTests();

$session = $this->prophesize(Session::class);
$session->info()
->willReturn([
'databaseName' => 'database'
]);
$session->name()
->willReturn('database');
$session->setExpiration(Argument::any())
->willReturn(100);

$sessionPool = $this->prophesize(SessionPoolInterface::class);
$sessionPool->acquire(Argument::any())
Expand Down
8 changes: 8 additions & 0 deletions Spanner/tests/Snippet/StructTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ public function setUp()
$instance->name()->willReturn(InstanceAdminClient::instanceName(self::PROJECT, self::INSTANCE));

$session = $this->prophesize(Session::class);
$session->info()
->willReturn([
'databaseName' => 'database'
]);
$session->name()
->willReturn('database');
$session->setExpiration(Argument::any())
->willReturn(100);

$sessionPool = $this->prophesize(SessionPoolInterface::class);
$sessionPool->acquire(Argument::any())
Expand Down
8 changes: 8 additions & 0 deletions Spanner/tests/Snippet/StructValueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ public function setUp()
$instance->name()->willReturn(InstanceAdminClient::instanceName(self::PROJECT, self::INSTANCE));

$session = $this->prophesize(Session::class);
$session->info()
->willReturn([
'databaseName' => 'database'
]);
$session->name()
->willReturn('database');
$session->setExpiration(Argument::any())
->willReturn(100);

$sessionPool = $this->prophesize(SessionPoolInterface::class);
$sessionPool->acquire(Argument::any())
Expand Down
6 changes: 6 additions & 0 deletions Spanner/tests/Snippet/TransactionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ public function setUp()
$this->connection = $this->getConnStub();
$operation = $this->prophesize(Operation::class);
$session = $this->prophesize(Session::class);
$session->info()
->willReturn([
'databaseName' => 'database'
]);
$session->name()
->willReturn('database');

$this->transaction = TestHelpers::stub(Transaction::class, [
$operation->reveal(),
Expand Down
4 changes: 4 additions & 0 deletions Spanner/tests/Snippet/TransactionalReadMethodsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ public function setUp()

$this->connection = $this->getConnStub();
$this->session = $this->prophesize(Session::class);
$this->session->info()
->willReturn([
'databaseName' => 'database'
]);
$this->operation = $this->prophesize(Operation::class);
}

Expand Down

0 comments on commit 9b78aaa

Please sign in to comment.