コード例 #1
0
ファイル: DbTest.php プロジェクト: etu/php-tools
 /**
  * @test
  */
 public function shouldFetchAll()
 {
     // Fixture
     $rows = [(object) ['id' => 1, 'name' => 'Alice']];
     $this->pdoBackendMock->method('fetchAll')->will($this->returnValue($rows));
     // Test
     $actual = $this->target->fetchAll();
     // Assert
     $this->assertSame($rows, $actual);
 }