コード例 #1
0
 public function test_it_can_be_created_from_a_string()
 {
     $card = Card::fromString('As');
     $this->assertEquals('A', (string) $card->getRank());
     $this->assertEquals('s', (string) $card->getSuit());
 }
コード例 #2
0
function print_card(Card $card)
{
    echo "[{$card->getRank()}{$card->getSuit()}]";
}