/** * @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()); }