TYPO3 CMS  TYPO3_6-2
MediaWizardProviderTest.php
Go to the documentation of this file.
1 <?php
3 
22 
26  protected $fixture;
27 
31  public function setUp() {
32  $this->fixture = $this->getAccessibleMock('\\TYPO3\\CMS\\Frontend\\MediaWizard\\MediaWizardProvider', array('dummy'), array(), '', FALSE);
33  }
34 
38  public function process_youtubeDataProvider() {
39  return array(
40  'http://youtu.be/2PMeCSQ--08' => array(
41  'http://youtu.be/2PMeCSQ--08',
42  'http://www.youtube.com/v/2PMeCSQ--08?fs=1'
43  ),
44  'http://www.youtube.com/embed/2PMeCSQ--08' => array(
45  'http://www.youtube.com/embed/2PMeCSQ--08',
46  'http://www.youtube.com/v/2PMeCSQ--08?fs=1'
47  ),
48  'http://www.youtube.com/watch?v=2PMeCSQ--08' => array(
49  'http://www.youtube.com/watch?v=2PMeCSQ--08',
50  'http://www.youtube.com/v/2PMeCSQ--08?fs=1'
51  ),
52  'http://www.youtube.com/?v=2PMeCSQ--08' => array(
53  'http://www.youtube.com/?v=2PMeCSQ--08',
54  'http://www.youtube.com/v/2PMeCSQ--08?fs=1'
55  ),
56  'http://www.youtube.com/v/2PMeCSQ--08' => array(
57  'http://www.youtube.com/v/2PMeCSQ--08',
58  'http://www.youtube.com/v/2PMeCSQ--08?fs=1'
59  ),
60  'http://www.youtube.com/e/2PMeCSQ--08' => array(
61  'http://www.youtube.com/e/2PMeCSQ--08',
62  'http://www.youtube.com/v/2PMeCSQ--08?fs=1'
63  ),
64  'http://www.youtube.com/watch?feature=player_embedded&v=2PMeCSQ--08' => array(
65  'http://www.youtube.com/watch?feature=player_embedded&v=2PMeCSQ--08',
66  'http://www.youtube.com/v/2PMeCSQ--08?fs=1'
67  ),
68  'http://www.youtube.com/watch?v=2PMeCSQ--08&list=PLGWGc5dfbzn_pvtJg7XskLva9XZpNTI88' => array(
69  'http://www.youtube.com/watch?v=2PMeCSQ--08&list=PLGWGc5dfbzn_pvtJg7XskLva9XZpNTI88',
70  'http://www.youtube.com/v/2PMeCSQ--08?fs=1'
71  ),
72  );
73  }
74 
84  public function process_youtube($url, $expected) {
85  $result = $this->fixture->_call('process_youtube', $url);
86  $this->assertEquals($expected, $result);
87  }
88 }
getAccessibleMock( $originalClassName, array $methods=array(), array $arguments=array(), $mockClassName='', $callOriginalConstructor=TRUE, $callOriginalClone=TRUE, $callAutoload=TRUE)
if($list_of_literals) if(!empty($literals)) if(!empty($literals)) $result
Analyse literals to prepend the N char to them if their contents aren&#39;t numeric.