Codeception / Codeception/AspectMock

Error in Generators

Đang mở
#142 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
PHP
Star
784
Fork
132
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I have a similar problem with https://github.com/Codeception/AspectMock/pull/66

When i try to mock laravel database (v5.2.45) file [/vendor/illuminate/database/Query/Builder.php](https://github.com/illuminate/database/blob/v5.2.45/Query/Builder.php#L1737)

`
/**
* Get a generator for the given query.
*
* @return \Generator
*/
public function cursor()
{
if (is_null($this->columns)) {
$this->columns = ['*'];
}
return $this->connection->cursor(
$this->toSql(), $this->getBindings(), ! $this->useWritePdo
);
}
`
Something goes wrong with this function, and tests fails with

> PHP Fatal error: Generators cannot return values using "return" in /www/backend/vendor/illuminate/database/Query/Builder.php on line 1750

How can I fix this?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.