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()); }
function print_card(Card $card) { echo "[{$card->getRank()}{$card->getSuit()}]"; }