public function testThrowsExceptionWhenValidatingInvalidJsonData() { $this->request->expects($this->once())->method('getContent')->will($this->returnValue('some string')); $this->resource->validateMetadata($this->event); }