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