/** * This test checks the Strng's stringValue() method. * * @return void */ public function testStringValue() { // initialize a new Strng instance $string = new Strng($test = 'Mustermann'); // check that string value of the Strng instance $this->assertEquals($test, $string->stringValue()); }
/** * This method returns the class as * a string representation. * * @return string The objects string representation * @see \AppserverIo\Lang\Object::__toString() */ public function __toString() { $string = new Strng($this->value); return $string->stringValue(); }
/** * Returns a new String, containing the concatenated value * of the this string with the passed one. * * @param \AppserverIo\Lang\Strng $string The String to concatenate * * @return \AppserverIo\Lang\Strng The concatenated String */ public function concat(Strng $string) { return new Strng($this->stringValue() . $string->stringValue()); }