Repo2\QueryReactor\Tests\Fixtures::getInsert PHP Метод

getInsert() публичный статический Метод

public static getInsert ( )
    public static function getInsert()
    {
        return QueryBuilder\insert(self::TABLE_NAME, ['id' => 1, 'name' => 'foo']);
    }

Usage Example

Пример #1
0
 public function testSingleInsert()
 {
     $query = $this->getQueryMock(Fixtures::getInsert());
     $query->expects($this->once())->method('resolve')->with($this->callback(function (Result $result) {
         // should be one affected row after insertion
         return $result->getRowsCount() === 1;
     }));
     $query->expects($this->never())->method('reject');
     $this->queryAwait($query);
 }