| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function testOrderByCountryName() |
||
| 16 | { |
||
| 17 | $collection = $this->getCollection(); |
||
| 18 | $collection->orderByName('en'); |
||
| 19 | $this->assertGreaterThan(1, $collection->count()); |
||
| 20 | $previousName = null; |
||
| 21 | foreach ($collection as $country) { |
||
| 22 | $name = $country->getNames()->get('en')->getName(); |
||
| 23 | $result = strcasecmp($name, $previousName); |
||
| 24 | $this->assertGreaterThan(0, $result); |
||
| 25 | $previousName = $name; |
||
| 26 | } |
||
| 27 | } |
||
| 28 | } |
||
| 29 |