Exemple #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');
 }
Exemple #2
0
 /**
  * @param integer $value
  */
 public function __construct($value)
 {
     parent::__construct($value);
 }
Exemple #3
0
 /**
  * @param int $value
  */
 public function __construct($value)
 {
     parent::__construct($value);
     $this->native = new \DateTime("{$value}-01-01");
 }