Ejemplo n.º 1
0
 /**
  * Create an instance of the class, sets the value property and returns the object.
  * @param string $value
  * @return \Puzzlout\Objects\Str
  * @throws \Exception
  */
 public static function InitWith($value)
 {
     $instance = new Str();
     $instance->value = $value;
     $instance->IsValid();
     return $instance;
 }
Ejemplo n.º 2
0
 public function testSetMethodOverwriteValue()
 {
     $result = new Str();
     $result->Set("test");
     $this->assertNotEmpty($result->Get());
     $this->assertEquals("test", $result->Get());
     $result->Set("test2");
     $this->assertNotEquals("", $result->Get());
     $this->assertEquals("test2", $result->Get());
 }