コード例 #1
0
 /**
  * @dataProvider emptyAndFilledCardCollectionProvider
  */
 public function testPrepend(CardCollection $cardCollection)
 {
     $count = $cardCollection->count();
     $prependCard = TestDataProvider::getCard2();
     $this->assertFalse($cardCollection->has($prependCard));
     $cardCollection->prepend($prependCard);
     $this->assertSame(++$count, $cardCollection->count());
     $this->assertSame($prependCard, $cardCollection->getFirst());
     $this->assertTrue($cardCollection->has($prependCard));
 }