Beispiel #1
0
 /**
  * @dataProvider testGetInfoByIdProvider
  */
 public function testGetInfoById($aids, $expected)
 {
     $appsCollection = Api_Dao_App::getApplicationInfoByIds($aids, RingsideSocialConfig::$apiKey);
     $apps = $appsCollection->toArray();
     $this->assertEquals(empty($expected), empty($apps));
     if (!empty($expected)) {
         foreach ($apps as $app) {
             $id = (int) $app['id'];
             $this->assertArrayHasKey($id, $expected);
             foreach ($expected[$id] as $key => $value) {
                 $this->assertEquals($value, $app[$key]);
             }
         }
     }
 }