| Conditions | 1 |
| Paths | 1 |
| Total Lines | 23 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 2 |
| 1 | <?php |
||
| 57 | public function testRoundSimulator() |
||
| 58 | { |
||
| 59 | $match = \App\Lib\DsManager\Models\Orm\Match::where( |
||
| 60 | [ |
||
| 61 | 'simulated' => false |
||
| 62 | ] |
||
| 63 | )->whereNotNull( |
||
| 64 | 'league_round_id' |
||
| 65 | )->get()->random(1); |
||
| 66 | $this->assertNotEmpty($match); |
||
| 67 | $result = \App\Lib\DsManager\Helpers\MatchSimulator::simulateRound($match->league_round_id); |
||
| 68 | $this->assertNotEmpty($result); |
||
| 69 | $match = \App\Lib\DsManager\Models\Orm\Match::where( |
||
| 70 | [ |
||
| 71 | 'id' => $match->id, |
||
| 72 | 'simulated' => true |
||
| 73 | ] |
||
| 74 | )->first(); |
||
| 75 | $this->assertNotEmpty($match); |
||
| 76 | $round = \App\Lib\DsManager\Models\Orm\LeagueRound::find($match->league_round_id); |
||
| 77 | $this->assertNotEmpty($round); |
||
| 78 | $this->assertTrue($round->simulated); |
||
| 79 | } |
||
| 80 | |||
| 82 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.