toString() public method

returns the string representation
public toString ( ) : string
return string
 public function testDefaultBuilder()
 {
     //create Entity in default state. this is enough to pass it
     //to the builder
     $object_1 = new Identifier(-1, 'order');
     $object_2 = new Identifier(-2, 'order');
     $this->assertNotEquals($object_1, $object_2);
     //scenario: call it twice with same object
     $builder = new EntityBuilder();
     $result_1 = $builder->getEntity($object_1);
     $this->assertEquals($object_1, $result_1);
     //same result when we call it again (should be cached, but we can only test
     //this when we override the protected build() method of the builder).
     $result_2 = $builder->getEntity($object_1);
     $this->assertEquals($object_1, $result_2);
     $this->assertEquals($result_1, $result_2, 'obviously');
     $this->assertEquals('izzum\\statemachine\\EntityBuilder', $builder->toString());
     //scenario: call it with different objects
     $builder = new EntityBuilder();
     $result_1 = $builder->getEntity($object_1);
     $this->assertEquals($object_1, $result_1);
     //different result when we call it again
     $result_2 = $builder->getEntity($object_2);
     $this->assertEquals($object_2, $result_2);
     $this->assertContains('EntityBuilder', $builder . '', '__toString()');
 }