public function testSubjectReturnsString()
 {
     $signup = new Signup();
     $testUtility = new TestUtility();
     $notification = new SignupConfirmation($signup);
     $subject = $testUtility->callProtectedMethod($notification, 'subject');
     $this->assertEquals('string', gettype($subject));
 }
 public function testGetFinalDataIncludesData()
 {
     $message = 'My Message';
     $code = 'MY_CODE';
     $data = ['data'];
     $testUtility = new TestUtility();
     $successResponse = new PropelSOASuccessResponse(null, 200);
     $testUtility->setProtectedProperty($successResponse, 'message', $message);
     $testUtility->setProtectedProperty($successResponse, 'code', $code);
     $finalData = $testUtility->callProtectedMethod($successResponse, 'getFinalData', [$data]);
     $this->assertEquals($message, $finalData['Message']);
     $this->assertEquals($code, $finalData['Code']);
     $this->assertEquals($data, $finalData['Data']);
     $this->assertEquals('success', $finalData['Type']);
 }
 public function testGetFinalDataIncludesFieldErrors()
 {
     $message = 'My Message';
     $code = 'MY_CODE';
     $data = ['data'];
     $testUtility = new TestUtility();
     $errorResponse = new PropelSOAErrorResponse(null, 404);
     $testUtility->setProtectedProperty($errorResponse, 'message', $message);
     $testUtility->setProtectedProperty($errorResponse, 'code', $code);
     $errorResponse->addFieldError('TestField1', 'Rule1', 'Message1');
     $finalData = $testUtility->callProtectedMethod($errorResponse, 'getFinalData', [$data]);
     $this->assertEquals($message, $finalData['Message']);
     $this->assertEquals($code, $finalData['Code']);
     $this->assertEquals($data, $finalData['Data']);
     $this->assertEquals('error', $finalData['Type']);
     $this->assertEquals('Rule1', $finalData['FieldErrors']['TestField1'][0]['rule']);
 }