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