ElementFactoryTest.php 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579
  1. <?php
  2. namespace Muzich\CoreBundle\Tests\Searcher;
  3. use Muzich\CoreBundle\lib\UnitTest;
  4. use Muzich\CoreBundle\Entity\Element;
  5. use Muzich\CoreBundle\Managers\ElementManager;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. class ElementFactoryTest extends UnitTest
  8. {
  9. ///**
  10. // * Test du fonctionnement du l'usine
  11. // * C'est plus un test fusible car il ne test que la méthode proceedFill.
  12. // *
  13. // */
  14. //public function testEngine()
  15. //{
  16. // $r = $this->getDoctrine();
  17. //
  18. // $bux = $r->getRepository('MuzichCoreBundle:User')
  19. // ->findOneByUsername('bux')
  20. // ;
  21. //
  22. // $hardtek = $r->getRepository('MuzichCoreBundle:Tag')->findOneByName('Hardtek');
  23. // $tribe = $r->getRepository('MuzichCoreBundle:Tag')->findOneByName('Tribe');
  24. //
  25. // $youtube_width = '590';
  26. // $youtube_height = '300';
  27. //
  28. // $element = new Element();
  29. // $element->setName('Mon bel element');
  30. // $element->setTags(json_encode(array($hardtek->getId(), $tribe->getId())));
  31. // $element->setUrl('http://www.youtube.com/watch?v=WC8qb_of04E');
  32. //
  33. // $factory = new ElementManager($element, $r->getEntityManager(), $this->_container);
  34. // $factory->proceedFill($bux);
  35. //
  36. // $url = 'http://www.youtube.com/embed/WC8qb_of04E';
  37. //
  38. // $this->assertEquals($element->getName(), 'Mon bel element');
  39. // $this->assertEquals($element->getUrl(), 'http://www.youtube.com/watch?v=WC8qb_of04E');
  40. // $this->assertEquals($element->getTags(), array($hardtek, $tribe));
  41. // $this->assertEquals($element->getEmbed(),
  42. // '<iframe width="'.$youtube_width.'" height="'.$youtube_height.'" src="'.$url.'" '
  43. // .'frameborder="0" allowfullscreen></iframe>'
  44. // );
  45. //
  46. //
  47. //}
  48. ///**
  49. // * Test des création de code embed
  50. // */
  51. //public function testEmbedsEngine()
  52. //{
  53. // $r = $this->getDoctrine();
  54. // $bux = $r->getRepository('MuzichCoreBundle:User')
  55. // ->findOneByUsername('bux')
  56. // ;
  57. // $hardtek = $r->getRepository('MuzichCoreBundle:Tag')->findOneByName('Hardtek');
  58. // $tribe = $r->getRepository('MuzichCoreBundle:Tag')->findOneByName('Tribe');
  59. //
  60. // ///*
  61. // // * - youtube.com && youtu.be
  62. // // */
  63. // //$this->proceed_elementAndFill(
  64. // // $bux,
  65. // // 'dfd4z5d3s45sgf45645',
  66. // // 'http://www.youtube.com/watch?v=Itfg7UpkcSs&feature=g-vrec&context=G2e61726RVAAAAAAAAAg',
  67. // // array($hardtek->getId(), $tribe->getId()),
  68. // // '<iframe width="'.$this->getParam('youtube_player_width').'" '
  69. // // .'height="'.$this->getParam('youtube_player_height').'" '
  70. // // .'src="http://www.youtube.com/embed/Itfg7UpkcSs" '
  71. // // .'frameborder="0" allowfullscreen></iframe>'
  72. // //);
  73. // //$this->proceed_elementAndFill(
  74. // // $bux,
  75. // // 'dfd4z5d3s45sgf45645',
  76. // // 'http://www.youtube.com/watch?feature=player_detailpage&v=Itfg7UpkcSs#t=3s',
  77. // // array($hardtek->getId(), $tribe->getId()),
  78. // // '<iframe width="'.$this->getParam('youtube_player_width').'" '
  79. // // .'height="'.$this->getParam('youtube_player_height').'" '
  80. // // .'src="http://www.youtube.com/embed/Itfg7UpkcSs" '
  81. // // .'frameborder="0" allowfullscreen></iframe>'
  82. // //);
  83. // //$this->proceed_elementAndFill(
  84. // // $bux,
  85. // // 'dfd4z5d3s45sgf45645',
  86. // // 'http://youtu.be/Itfg7UpkcSs',
  87. // // array($hardtek->getId(), $tribe->getId()),
  88. // // '<iframe width="'.$this->getParam('youtube_player_width').'" '
  89. // // .'height="'.$this->getParam('youtube_player_height').'" '
  90. // // .'src="http://www.youtube.com/embed/Itfg7UpkcSs" '
  91. // // .'frameborder="0" allowfullscreen></iframe>'
  92. // //);
  93. // //$this->proceed_elementAndFill(
  94. // // $bux,
  95. // // 'dfd4z5d3s45sgf45645',
  96. // // 'http://www.youtube.com/watch?v=Itfg7UpkcSs',
  97. // // array($hardtek->getId(), $tribe->getId()),
  98. // // '<iframe width="'.$this->getParam('youtube_player_width').'" '
  99. // // .'height="'.$this->getParam('youtube_player_height').'" '
  100. // // .'src="http://www.youtube.com/embed/Itfg7UpkcSs" '
  101. // // .'frameborder="0" allowfullscreen></iframe>'
  102. // //);
  103. // //
  104. // ///*
  105. // // * - dailymotion.com
  106. // // */
  107. // //$this->proceed_elementAndFill(
  108. // // $bux,
  109. // // 'fzgrj79ukl46ye4rgz6a',
  110. // // 'http://www.dailymotion.com/video/xafj1q_black-bomb-a-tales-from-the-old-sch_music',
  111. // // array($hardtek->getId(), $tribe->getId()),
  112. // // '<iframe frameborder="0" width="'.$this->getParam('dailymotion_player_width').'" '
  113. // // .'height="'.$this->getParam('dailymotion_player_height').'" '
  114. // // .'src="http://www.dailymotion.com/embed/video/xafj1q?autoPlay=1"></iframe>'
  115. // //);
  116. //
  117. // /*
  118. // * - soundcloud.com
  119. // */
  120. // $url_id = 'http://soundcloud.com/matas/sets/library-project';
  121. // $embed_id = md5($url_id);
  122. // $this->proceed_elementAndFill(
  123. // $bux,
  124. // 'faez7tf8re9h4gf5j64dssz',
  125. // 'http://soundcloud.com/matas/sets/library-project',
  126. // array($hardtek->getId(), $tribe->getId()),
  127. // '<object height="'.$this->getParam('soundcloud_player_height').'" width="100%" id="embed_'.$embed_id.'" '
  128. // .'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
  129. // <param name="movie" value="http://player.soundcloud.com/player.swf?url='.$url_id.'&amp;'
  130. // .'enable_api=true&amp;object_id=embed_'.$embed_id.'"></param>
  131. // <param name="allowscriptaccess" value="always"></param>
  132. // <embed allowscriptaccess="always" height="'.$this->getParam('soundcloud_player_height').'" '
  133. // .'src="http://player.soundcloud.com/player.swf?url='.$url_id.'&amp;enable_api=true'
  134. // .'&amp;object_id=embed_'.$embed_id.'" type="application/x-shockwave-flash" '
  135. // .'width="100%" name="embed_'.$embed_id.'"></embed>
  136. // </object>'
  137. // );
  138. //
  139. // $url_id = 'http://soundcloud.com/matas/above-hyperion-redux';
  140. // $embed_id = md5($url_id);
  141. // $this->proceed_elementAndFill(
  142. // $bux,
  143. // 'faez7tf8re9h4gf5j64dssz',
  144. // 'http://soundcloud.com/matas/above-hyperion-redux',
  145. // array($hardtek->getId(), $tribe->getId()),
  146. //
  147. // '<object height="'.$this->getParam('soundcloud_player_height').'" width="100%" id="embed_'.$embed_id.'" '
  148. // .'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
  149. // <param name="movie" value="http://player.soundcloud.com/player.swf?url='.$url_id.'&amp;'
  150. // .'enable_api=true&amp;object_id=embed_'.$embed_id.'"></param>
  151. // <param name="allowscriptaccess" value="always"></param>
  152. // <embed allowscriptaccess="always" height="'.$this->getParam('soundcloud_player_height').'" '
  153. // .'src="http://player.soundcloud.com/player.swf?url='.$url_id.'&amp;enable_api=true'
  154. // .'&amp;object_id=embed_'.$embed_id.'" type="application/x-shockwave-flash" '
  155. // .'width="100%" name="embed_'.$embed_id.'"></embed>
  156. // </object>'
  157. // );
  158. //
  159. // $this->proceed_elementAndFill(
  160. // $bux,
  161. // 'faez7tf8re9h4gf5j64dssz',
  162. // 'http://soundcloud.com/tracks/search?q%5Bfulltext%5D=EEK+A+MOUSSE&q%5Btype%5D=&q%5Bduration%5D=',
  163. // array($hardtek->getId(), $tribe->getId()),
  164. // null
  165. // );
  166. //
  167. // $this->proceed_elementAndFill(
  168. // $bux,
  169. // 'faez7tf8re9h4gf5j64dssz',
  170. // 'http://soundcloud.com/people/search?q%5Bfulltext%5D=EEK+A+MOUSSE&q%5Btype%5D=&q%5Bduration%5D=',
  171. // array($hardtek->getId(), $tribe->getId()),
  172. // null
  173. // );
  174. //
  175. // $this->proceed_elementAndFill(
  176. // $bux,
  177. // 'faez7tf8re9h4gf5j64dssz',
  178. // 'http://soundcloud.com/groups/search?q%5Bfulltext%5D=EEK+A+MOUSSE&q%5Btype%5D=&q%5Bduration%5D=',
  179. // array($hardtek->getId(), $tribe->getId()),
  180. // null
  181. // );
  182. //
  183. // /*
  184. // * - jamendo.com
  185. // */
  186. //
  187. // $this->proceed_elementAndFill(
  188. // $bux,
  189. // 'gthyk456+liszz',
  190. // 'http://www.jamendo.com/fr/album/30661',
  191. // array($hardtek->getId(), $tribe->getId()),
  192. //
  193. // '<object width="'.$this->getParam('jamendo_player_width').'" height="'.$this->getParam('jamendo_player_height').'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"'
  194. // .' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" align="middle">
  195. // <param name="allowScriptAccess" value="always" />
  196. // <param name="wmode" value="transparent" />
  197. // <param name="movie" value="http://widgets.jamendo.com/fr/album/?album_id=30661&playertype=2008" />
  198. // <param name="quality" value="high" />
  199. // <param name="bgcolor" value="#FFFFFF" />
  200. // <embed src="http://widgets.jamendo.com/fr/album/?album_id=30661&playertype=2008" quality="high" wmode="transparent" bgcolor="#FFFFFF"'
  201. // .' width="'.$this->getParam('jamendo_player_width').'" height="'.$this->getParam('jamendo_player_height').'" align="middle" allowScriptAccess="always"'
  202. // .' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
  203. // &nbsp;
  204. // </embed>
  205. // &nbsp;
  206. // </object>'
  207. // );
  208. //
  209. // $this->proceed_elementAndFill(
  210. // $bux,
  211. // 'gthyk456+liszz',
  212. // 'http://www.jamendo.com/fr/track/207079',
  213. // array($hardtek->getId(), $tribe->getId()),
  214. //
  215. // '<object width="'.$this->getParam('jamendo_player_width').'" height="'.$this->getParam('jamendo_player_height').'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"'
  216. // .' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" align="middle">
  217. // <param name="allowScriptAccess" value="always" />
  218. // <param name="wmode" value="transparent" />
  219. // <param name="movie" value="http://widgets.jamendo.com/fr/track/?track_id=207079&playertype=2008" />
  220. // <param name="quality" value="high" />
  221. // <param name="bgcolor" value="#FFFFFF" />
  222. // <embed src="http://widgets.jamendo.com/fr/track/?track_id=207079&playertype=2008" quality="high" wmode="transparent" bgcolor="#FFFFFF"'
  223. // .' width="'.$this->getParam('jamendo_player_width').'" height="'.$this->getParam('jamendo_player_height').'" align="middle" allowScriptAccess="always"'
  224. // .' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
  225. // &nbsp;
  226. // </embed>
  227. // &nbsp;
  228. // </object>'
  229. // );
  230. //
  231. // $this->proceed_elementAndFill(
  232. // $bux,
  233. // 'gthyk456+liszz',
  234. // 'http://www.jamendo.com/fr/search/all/psytrance',
  235. // array($hardtek->getId(), $tribe->getId()),
  236. // null
  237. // );
  238. //
  239. // $this->proceed_elementAndFill(
  240. // $bux,
  241. // 'gthyk456+liszz',
  242. // 'http://www.jamendo.com/fr/artist/DJ_BETO',
  243. // array($hardtek->getId(), $tribe->getId()),
  244. // null
  245. // );
  246. //
  247. // ///*/*
  248. // // * - deezer.com
  249. // // */
  250. // //
  251. // //$this->proceed_elementAndFill(
  252. // // $bux,
  253. // // 'a9j4l56dsu8ra5gf647je',
  254. // // 'http://www.deezer.com/fr/music/pantera/far-beyond-driven-80398',
  255. // // array($hardtek->getId(), $tribe->getId()),
  256. // // '<iframe scrolling="no" frameborder="0" allowTransparency="true" '
  257. // // .'src="http://www.deezer.com/fr/plugins/player?autoplay=true&playlist=true'
  258. // // .'&width='.$this->getParam('deezer_player_width').'&height='
  259. // // .$this->getParam('deezer_player_height')
  260. // // .'&cover=true&btn_popup=true&type=album&id=80398&title=" '
  261. // // .'width="'.$this->getParam('deezer_player_width').'" height="'
  262. // // .$this->getParam('deezer_player_height')
  263. // // .'"></iframe>'
  264. // //);
  265. // //
  266. // //$this->proceed_elementAndFill(
  267. // // $bux,
  268. // // 'g4th4545ku6kti456e456z',
  269. // // 'http://www.deezer.com/fr/music/playlist/18701350',
  270. // // array($hardtek->getId(), $tribe->getId()),
  271. // // '<iframe scrolling="no" frameborder="0" allowTransparency="true" '
  272. // // .'src="http://www.deezer.com/fr/plugins/player?autoplay=true&playlist=true'
  273. // // .'&width='.$this->getParam('deezer_player_width').'&height='
  274. // // .$this->getParam('deezer_player_height')
  275. // // .'&cover=true&btn_popup=true&type=playlist&id=18701350&title=" '
  276. // // .'width="'.$this->getParam('deezer_player_width').'" height="'
  277. // // .$this->getParam('deezer_player_height')
  278. // // .'"></iframe>'
  279. // //);
  280. //
  281. //}
  282. public function testDataApiengine()
  283. {
  284. $r = $this->getDoctrine();
  285. $bux = $r->getRepository('MuzichCoreBundle:User')
  286. ->findOneByUsername('bux')
  287. ;
  288. // /*
  289. // * - youtube.com && youtu.be
  290. // */
  291. //
  292. // $this->assertEquals(array(
  293. // 'data_ref_id' => 'Itfg7UpkcSs',
  294. // 'data_title' => 'DIDIER SUPER SUR FRANCE O : UN PETIT MALENTENDU ?'
  295. // ),$this->proceed_element_datas_api(
  296. // $bux,
  297. // 'http://www.youtube.com/watch?v=Itfg7UpkcSs&feature=g-vrec&context=G2e61726RVAAAAAAAAAg'
  298. // ));
  299. //
  300. // $this->assertEquals(array(
  301. // 'data_ref_id' => 'Itfg7UpkcSs',
  302. // 'data_title' => 'DIDIER SUPER SUR FRANCE O : UN PETIT MALENTENDU ?'
  303. // ),$this->proceed_element_datas_api(
  304. // $bux,
  305. // 'http://www.youtube.com/watch?feature=player_detailpage&v=Itfg7UpkcSs#t=3s'
  306. // ));
  307. //
  308. // $this->assertEquals(array(
  309. // 'data_ref_id' => 'Itfg7UpkcSs',
  310. // 'data_title' => 'DIDIER SUPER SUR FRANCE O : UN PETIT MALENTENDU ?'
  311. // ),$this->proceed_element_datas_api(
  312. // $bux,
  313. // 'http://youtu.be/Itfg7UpkcSs'
  314. // ));
  315. //
  316. // $this->assertEquals(array(
  317. // 'data_ref_id' => 'Itfg7UpkcSs',
  318. // 'data_title' => 'DIDIER SUPER SUR FRANCE O : UN PETIT MALENTENDU ?'
  319. // ),$this->proceed_element_datas_api(
  320. // $bux,
  321. // 'http://www.youtube.com/watch?v=Itfg7UpkcSs'
  322. // ));
  323. //
  324. //
  325. ///*
  326. // * - dailymotion.com
  327. // */
  328. //
  329. // // 'http://www.dailymotion.com/video/xafj1q_black-bomb-a-tales-from-the-old-sch_music'
  330. //$this->assertEquals(array(
  331. // 'data_ref_id' => 'xafj1q',
  332. // 'data_thumb_url' => 'http://s1.dmcdn.net/kcSK/160x120-si6.jpg',
  333. // 'data_type' => 'other',
  334. // 'data_title' => 'Black Bomb A - Tales From The Old School',
  335. // 'data_tags' => array(
  336. // 0 => 'Metal'
  337. // )
  338. //),$this->proceed_element_datas_api(
  339. // $bux,
  340. // 'http://www.dailymotion.com/video/xafj1q_black-bomb-a-tales-from-the-old-sch_music'
  341. //));
  342. //
  343. //// http://www.dailymotion.com/video/x4om5b_punish-yourself-gimme-cocaine-live_music?search_algo=2
  344. //$this->assertEquals(array(
  345. // 'data_ref_id' => 'x4om5b',
  346. // 'data_thumb_url' => 'http://s1.dmcdn.net/sRiY/160x120-BYy.jpg',
  347. // 'data_type' => 'other',
  348. // 'data_title' => 'Punish yourself - gimme cocaine (live à nancy, azimut854)',
  349. // 'data_tags' => array(
  350. // 0 => 'Metal',
  351. // 1 => 'Electro'
  352. // )
  353. //),$this->proceed_element_datas_api(
  354. // $bux,
  355. // 'http://www.dailymotion.com/video/x4om5b_punish-yourself-gimme-cocaine-live_music?search_algo=2'
  356. //));
  357. //
  358. ///*
  359. // * - soundcloud.com
  360. // */
  361. //
  362. //// 'http://soundcloud.com/matas/sets/library-project'
  363. //
  364. //// On retire le test de "data_thumb_url", chez sound cloud ca arrete pas de
  365. //// changer en ce moment
  366. //
  367. //$datas = $this->proceed_element_datas_api(
  368. // $bux,
  369. // 'http://soundcloud.com/matas/sets/library-project'
  370. //);
  371. //
  372. //$this->assertTrue(array_key_exists('data_thumb_url', $datas));
  373. //
  374. //if (array_key_exists('data_thumb_url', $datas))
  375. //{
  376. // unset($datas['data_thumb_url']);
  377. //}
  378. //
  379. //$this->assertEquals(array(
  380. // 'data_ref_id' => 3770,
  381. // 'data_title' => 'Library Project',
  382. // //'data_thumb_url' => 'http://i1.sndcdn.com/artworks-000000514203-fsvbcj-large.jpg?51826bf',
  383. // 'data_type' => 'playlist',
  384. // 'data_download' => null,
  385. // 'data_download_url' => null,
  386. // 'data_artist' => 'matas',
  387. // 'data_normalized_url' => 'http://api.soundcloud.com/playlists/3770',
  388. // 'data_tags' => array(0 => '')
  389. //),$datas);
  390. //
  391. //// Test des tags récupérés
  392. //$datas = $this->proceed_element_datas_api(
  393. // $bux,
  394. // 'https://soundcloud.com/mixessss3/white-stripes-vs-led-zeppelin-icky-kinky-love-rock-mashup-dj-zebra'
  395. //);
  396. //
  397. //$this->assertTrue(array_key_exists('data_thumb_url', $datas));
  398. //if (array_key_exists('data_thumb_url', $datas))
  399. //{
  400. // unset($datas['data_thumb_url']);
  401. //}
  402. //
  403. //$this->assertEquals(array(
  404. // 'data_ref_id' => 2215186,
  405. // 'data_title' => 'White Stripes Vs Led Zeppelin - Icky Kinky Love (Rock Mashup) DJ Zebra',
  406. // //'data_thumb_url' => 'http://i1.sndcdn.com/artworks-000000514203-fsvbcj-large.jpg?51826bf',
  407. // 'data_type' => 'track',
  408. // 'data_download' => null,
  409. // 'data_download_url' => null,
  410. // 'data_artist' => 'Mixes and Mashups #3',
  411. // 'data_normalized_url' => 'http://api.soundcloud.com/tracks/2215186',
  412. // 'data_tags' => array(0 => 'Rock', 1 => 'rock ')
  413. //),$datas);
  414. //
  415. //
  416. //// 'http://soundcloud.com/matas/above-hyperion-redux'
  417. //$datas = $this->proceed_element_datas_api(
  418. // $bux,
  419. // 'http://soundcloud.com/matas/above-hyperion-redux'
  420. //);
  421. //
  422. //$this->assertTrue(array_key_exists('data_thumb_url', $datas));
  423. //
  424. //if (array_key_exists('data_thumb_url', $datas))
  425. //{
  426. // unset($datas['data_thumb_url']);
  427. //}
  428. //$this->assertEquals(array(
  429. // 'data_ref_id' => 3154252,
  430. // 'data_title' => 'Above Hyperion (redux)',
  431. // //'data_thumb_url' => 'http://i1.sndcdn.com/artworks-000001536693-gb1n5v-large.jpg?51826bf',
  432. // 'data_type' => 'track',
  433. // 'data_download' => null,
  434. // 'data_download_url' => null,
  435. // 'data_artist' => 'matas',
  436. // 'data_tags' => array(
  437. // 0 => 'Spacestep'
  438. // ),
  439. // 'data_normalized_url' => 'http://api.soundcloud.com/tracks/3154252'
  440. //),$datas);
  441. //
  442. //// 'http://soundcloud.com/tracks/search?q%5Bfulltext%5D=EEK+A+MOUSSE&q%5Btype%5D=&q%5Bduration%5D='
  443. //
  444. //$this->assertEquals(array(
  445. //
  446. //),$this->proceed_element_datas_api(
  447. // $bux,
  448. // 'http://soundcloud.com/tracks/search?q%5Bfulltext%5D=EEK+A+MOUSSE&q%5Btype%5D=&q%5Bduration%5D='
  449. //));
  450. //
  451. ////'http://soundcloud.com/people/search?q%5Bfulltext%5D=EEK+A+MOUSSE&q%5Btype%5D=&q%5Bduration%5D='
  452. //
  453. //$this->assertEquals(array(
  454. //
  455. //),$this->proceed_element_datas_api(
  456. // $bux,
  457. // 'http://soundcloud.com/people/search?q%5Bfulltext%5D=EEK+A+MOUSSE&q%5Btype%5D=&q%5Bduration%5D='
  458. //));
  459. //
  460. //// 'http://soundcloud.com/groups/search?q%5Bfulltext%5D=EEK+A+MOUSSE&q%5Btype%5D=&q%5Bduration%5D='
  461. //
  462. //$this->assertEquals(array(
  463. //
  464. //),$this->proceed_element_datas_api(
  465. // $bux,
  466. // 'http://soundcloud.com/groups/search?q%5Bfulltext%5D=EEK+A+MOUSSE&q%5Btype%5D=&q%5Bduration%5D='
  467. //));
  468. //
  469. ///*
  470. // * - jamendo.com
  471. // */
  472. //
  473. //// 'http://www.jamendo.com/fr/list/a120468/6-00-am'
  474. //
  475. //$this->assertEquals(array(
  476. // 'data_ref_id' => '120468',
  477. // 'data_title' => '6:00 AM',
  478. // 'data_type' => 'album',
  479. // 'data_thumb_url' => 'https://imgjam.com/albums/s120/120468/covers/1.100.jpg',
  480. // 'data_artist' => 'Azyd Azylum',
  481. // 'data_tags' => array(
  482. // 0 => 'Metal',
  483. // 1 => 'Hardcore',
  484. // 2 => 'Metalcore',
  485. // 3 => 'Azyd',
  486. // 4 => 'Azylum',
  487. // ),
  488. // 'data_download' => true,
  489. //),$this->proceed_element_datas_api(
  490. // $bux,
  491. // 'http://www.jamendo.com/fr/list/a120468/6-00-am'
  492. //));
  493. //
  494. //// 'http://www.jamendo.com/fr/track/207079'
  495. //
  496. //$this->assertEquals(array(
  497. // 'data_ref_id' => '207079',
  498. // 'data_title' => 'Insanity',
  499. // 'data_type' => 'track',
  500. // 'data_thumb_url' => 'https://imgjam.com/albums/s30/30661/covers/1.100.jpg',
  501. // 'data_artist' => 'Ptit lutin',
  502. // 'data_tags' => array(
  503. // 0 => 'Techno',
  504. // 1 => 'Hardtek'
  505. // ),
  506. // 'data_download' => true,
  507. //),$this->proceed_element_datas_api(
  508. // $bux,
  509. // 'http://www.jamendo.com/fr/track/207079'
  510. //));
  511. //
  512. //// 'http://www.jamendo.com/fr/search/all/psytrance'
  513. //
  514. //$this->assertEquals(array(
  515. //),$this->proceed_element_datas_api(
  516. // $bux,
  517. // 'http://www.jamendo.com/fr/search/all/psytrance'
  518. //));
  519. //
  520. //// 'http://www.jamendo.com/fr/artist/DJ_BETO'
  521. //
  522. //$this->assertEquals(array(
  523. //),$this->proceed_element_datas_api(
  524. // $bux,
  525. // 'http://www.jamendo.com/fr/artist/DJ_BETO'
  526. //));
  527. //
  528. ///*/*
  529. // * - deezer.com
  530. // */
  531. //
  532. //// 'http://www.deezer.com/fr/music/pantera/far-beyond-driven-80398'
  533. //
  534. //$this->assertEquals(array(
  535. // 'data_ref_id' => '80398',
  536. // 'data_type' => 'album',
  537. // 'data_thumb_url' => 'http://api.deezer.com/2.0/album/80398/image',
  538. // 'data_title' => 'Far Beyond Driven',
  539. // 'data_artist' => 'Pantera'
  540. //),$this->proceed_element_datas_api(
  541. // $bux,
  542. // 'http://www.deezer.com/fr/music/pantera/far-beyond-driven-80398'
  543. //));
  544. //
  545. //// 'http://www.deezer.com/fr/music/playlist/18701350'
  546. //
  547. //$this->assertEquals(array(
  548. // 'data_ref_id' => '18701350',
  549. // 'data_type' => 'playlist',
  550. // 'data_title' => 'Trucs Cools'
  551. //),$this->proceed_element_datas_api(
  552. // $bux,
  553. // 'http://www.deezer.com/fr/music/playlist/18701350'
  554. //));
  555. //
  556. ///*
  557. // * Vimeo
  558. // *
  559. // */
  560. //
  561. //$this->assertEquals(array(
  562. // 'data_ref_id' => '43258820',
  563. // 'data_title' => 'Punish Yourself',
  564. // 'data_thumb_url' => 'http://b.vimeocdn.com/ts/301/282/301282081_200.jpg'
  565. //),$this->proceed_element_datas_api(
  566. // $bux,
  567. // 'http://vimeo.com/43258820'
  568. //));
  569. }
  570. }