public function testGetOSTypes() { $OSTypes = UserAgent::getOSTypes(); $expectedOSTypes = ['unknown', 'Android', 'BSD', 'Firefox OS', 'iOS', 'Linux', 'Nintendo DS', 'Nintendo Wii', 'OS X', 'PlayStation', 'Windows', 'Xbox']; $this->assertInternalType('array', $OSTypes); $this->assertNotEmpty($OSTypes); $this->assertEquals(count($expectedOSTypes), count($OSTypes)); foreach ($expectedOSTypes as $type) { $this->assertContains($type, $OSTypes); } }