CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • Unit Testing (Moderator: Michał Mach) »
  • Testing Profile->get fields with an entity subtype
Pages: [1]

Author Topic: Testing Profile->get fields with an entity subtype  (Read 940 times)

Jeremy Proffitt

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 2
    • Mobius New Media
  • CiviCRM version: 4.4.x
  • CMS version: Joomla 2.5.x/3.x / D7
  • MySQL version: 5.1.x
  • PHP version: 5.3.10+, 5.4.x
Testing Profile->get fields with an entity subtype
March 29, 2014, 07:34:17 am
I was able to get the testing environment set up, but I'm having trouble figuring out how to assert the entity_extends_column_value in order to communicate that the profile contains a field restricted to a subtype.

I've cloned the testGetFields() method and added
Code: [Select]
$this->assertEquals('Contact', $result['values']['custom_1']['extends']);
$this->assertEquals(array('TestSubType'), $result['values']['custom_1']['entity_extends_column_value']);

Using phpunit with tap, I'm getting back a 'null does not match expected type "array" error. I've also tried asserting TestSubType as a string, but get a 'Failed asserting that null matches expected "TestSubType"'.

It seems like there's just one thing missing, but I can't seem to put a finger on it.
Jeremy Proffitt
Mobius New Media
IRC: JP_EzoD

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Testing Profile->get fields with an entity subtype
March 30, 2014, 02:48:25 pm
Can you push what you are working on to github as a branch so we can see it?
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • Unit Testing (Moderator: Michał Mach) »
  • Testing Profile->get fields with an entity subtype

This forum was archived on 2017-11-26.