Codeception / Codeception/AspectMock
How can i past a double to a class contructor?
- 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ả
the following doesnt' work
```
$ck = test::double(CacheKey::class, [ 'track' => null,])->make();
$cityConfigProvider = new CityConfigProvider($cityConfigBuilder, $ck); // failed for $ck is not an instance of CacheKey
$ck->verifyInvoked('track');
$value = $cityConfigProvider->get($cityId, 'wechat_app_Id');
```
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
Hướng nghiên cứu
Start by reproducing the shown test::double(CacheKey::class, ...) setup and the CityConfigProvider constructor call. Inspect how the mocking framework creates doubles for class types; done means the injected $ck is accepted as a CacheKey instance and verifyInvoked('track') works.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- php
- Lĩnh vực
- testing-qa
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 30/100