示例#1
0
 public function testConstructor()
 {
     $integer = new Integer(7);
     $this->assertSame(7, $integer->getValue());
     $this->setExpectedException('BestServedCold\\PhalueObjects\\Exception\\InvalidTypeException');
     new Integer('this is the wrong type');
 }
示例#2
0
 /**
  * @param integer $value
  */
 public function __construct($value)
 {
     parent::__construct($value);
 }
示例#3
0
 /**
  * @param int $value
  */
 public function __construct($value)
 {
     parent::__construct($value);
     $this->native = new \DateTime("{$value}-01-01");
 }