Conditions | 2 |
Paths | 1 |
Total Lines | 34 |
Code Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
90 | public function testIndexRunBulkTwiceIfMoreThanBatchSize() |
||
91 | { |
||
92 | $provider = $this->getMockForAbstractClass(DataProvider::class); |
||
93 | |||
94 | $client = $this->getClient(); |
||
95 | $client |
||
96 | ->expects($this->exactly(2)) |
||
97 | ->method('bulk') |
||
98 | ; |
||
99 | |||
100 | $provider |
||
101 | ->expects($this->once()) |
||
102 | ->method('populate') |
||
103 | ->will( |
||
104 | $this->returnCallback( |
||
105 | function () use ($provider) { |
||
106 | for($i = 0; $i < 1500; $i++) { |
||
107 | $provider->index( |
||
108 | 'my_id', |
||
109 | ['foo' => 'bar'] |
||
110 | ); |
||
111 | } |
||
112 | } |
||
113 | ) |
||
114 | ) |
||
115 | ; |
||
116 | |||
117 | $provider->run( |
||
118 | $client, |
||
119 | 'my_index', |
||
120 | 'my_type', |
||
121 | $this->getMock(EventDispatcherInterface::class) |
||
122 | ); |
||
123 | } |
||
124 | } |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.