Created
June 2, 2012 07:13
-
-
Save ksomemo/2857103 to your computer and use it in GitHub Desktop.
カードの振り分けのテスト
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once '/tests/Part1/CardManager.php'; | |
class CardTest extends PHPUnit_Framework_TestCase | |
{ | |
/** | |
* @dataProvider getDealCard | |
*/ | |
public function testDeal($deal_num, $card, $expect) | |
{ | |
$card_manager = new CardManager(); | |
$result = $card_manager->deal($deal_num, $card); | |
$this->assertEquals($result, $expect); | |
} | |
public function getDealCard() | |
{ | |
return array( | |
array(3, '123123123', array('111', '222', '333')), | |
array(4, '123123123', array('12', '23', '31', '12')), | |
array(6, '012345012345012345', array('000', '111', '222', '333', '444', '555')), | |
array(4, '111122223333', array('123', '123', '123', '123')), | |
array(1, '012345012345012345', array('012345012345012345')), | |
array(6, '01234', array('', '', '', '', '', '')), | |
array(2, '', array('', '')), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment