add() публичный Метод

Adds a value to this collection
public add ( scalar $value )
$value scalar
 /**
  * @expectedException InvalidArgumentException
  * @expectedExceptionMessage Argument 1 passed to Protobuf\ScalarCollection::add must be a scalar value, stdClass given
  */
 public function testInvalidArgumentExceptionAddObject()
 {
     $this->collection->add(new \stdClass());
 }