Skip to content

Instantly share code, notes, and snippets.

@glenjamin
Created December 12, 2013 17:38
Show Gist options
  • Save glenjamin/7932072 to your computer and use it in GitHub Desktop.
Save glenjamin/7932072 to your computer and use it in GitHub Desktop.
PHPUnit data providers can have test docs too!
<?php
public function providerGetEventId() {
return array(
'wrong way around' => array(
'Premier League',
array('id' => 5,'name' => 'Hull', 'shortname' => 'HUL'),
array('id' => 6,'name' => 'Manchester City', 'shortname' => 'MNC'),
null
),
'different event type' => array(
'FA Cup',
array('id' => 1,'name' => 'Liverpool', 'shortname' => 'LIV'),
array('id' => 2,'name' => 'Man Utd', 'shortname' => 'MNU'),
null
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment