コード例 #1
0
ファイル: SMSTest.php プロジェクト: pontifex/sms
 /**
  * @return Struct\SMSCollection
  */
 protected function makeSMSCollection()
 {
     $item1 = new Struct\SMS();
     $item1->setTo(new Struct\NumberTo(self::GERMANY, '456456456'));
     $item1->setFrom(new Struct\NumberFrom(self::GERMANY, '123456789'));
     $item1->setMessage(new Struct\Message('Message content!'));
     $item2 = new Struct\SMS();
     $item2->setTo(new Struct\NumberTo(self::GERMANY, '456456456'));
     $item2->setFrom(new Struct\NumberFrom(self::GERMANY, '123456789'));
     $item2->setMessage(new Struct\Message('Message content!'));
     $coll = new Struct\SMSCollection();
     $coll->attach($item1);
     $coll->attach($item2);
     return $coll;
 }
コード例 #2
0
ファイル: SMS.php プロジェクト: pontifex/sms
 /**
  * @param Struct\SMSCollection $itemColl
  * @return bool
  */
 protected function isCollectionEmpty(Struct\SMSCollection $itemColl)
 {
     return 0 === $itemColl->count() ? true : false;
 }
コード例 #3
0
ファイル: SMSCollectionTest.php プロジェクト: pontifex/sms
 /**
  *
  */
 public function testRemoveAllWithValidObjectShouldReturnVoid()
 {
     $this->object->removeAll(new SMSCollection());
 }