Skip to content

Commit

Permalink
Try with public property
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints committed Oct 9, 2020
1 parent 3203e95 commit 551d587
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Connection.php
Expand Up @@ -40,7 +40,7 @@ class Connection implements ConnectionInterface
*
* @var \PDO|\Closure
*/
protected $readPdo;
public $readPdo;

/**
* The name of the connected database.
Expand Down
3 changes: 2 additions & 1 deletion tests/Database/DatabaseConnectionTest.php
Expand Up @@ -55,6 +55,7 @@ public function testSelectOneCallsSelectAndReturnsSingleResult()
$this->assertSame('foo', $connection->selectOne('foo', ['bar' => 'baz']));
}

/** @group Foo */
public function testSelectProperlyCallsPDO()
{
$pdo = $this->getMockBuilder(DatabaseConnectionTestMockPDO::class)->setMethods(['prepare'])->getMock();
Expand All @@ -66,7 +67,7 @@ public function testSelectProperlyCallsPDO()
$statement->expects($this->once())->method('fetchAll')->willReturn(['boom']);
$pdo->expects($this->once())->method('prepare')->with('foo')->willReturn($statement);
$mock = $this->getMockConnection(['prepareBindings'], $writePdo);
$mock->setReadPdo($pdo);
$mock->readPdo = $pdo;
$mock->expects($this->once())->method('prepareBindings')->with($this->equalTo(['foo' => 'bar']))->willReturn(['foo' => 'bar']);
$results = $mock->select('foo', ['foo' => 'bar']);
$this->assertEquals(['boom'], $results);
Expand Down
2 changes: 0 additions & 2 deletions tests/Database/DatabaseEloquentBuilderTest.php
Expand Up @@ -1044,7 +1044,6 @@ public function testWhereKeyMethodWithStringZero()
$builder->whereKey($int);
}

/** @group Foo */
public function testWhereKeyMethodWithStringNull()
{
$model = new EloquentBuilderTestStubStringPrimaryKey();
Expand Down Expand Up @@ -1097,7 +1096,6 @@ public function testWhereKeyNotMethodWithStringZero()
$builder->whereKeyNot($int);
}

/** @group Foo */
public function testWhereKeyNotMethodWithStringNull()
{
$model = new EloquentBuilderTestStubStringPrimaryKey();
Expand Down
1 change: 0 additions & 1 deletion tests/Mail/MailSesTransportTest.php
Expand Up @@ -13,7 +13,6 @@

class MailSesTransportTest extends TestCase
{
/** @group Foo */
public function testGetTransport()
{
$container = new Container();
Expand Down

0 comments on commit 551d587

Please sign in to comment.