diff --git a/tests/phpunit/api/v3/TwingleCampaign/CreateTest.php b/tests/phpunit/api/v3/TwingleCampaign/CreateTest.php new file mode 100644 index 0000000..d83c6ac --- /dev/null +++ b/tests/phpunit/api/v3/TwingleCampaign/CreateTest.php @@ -0,0 +1,53 @@ +installMe(__DIR__) + ->apply(); + } + + /** + * The setup() method is executed before the test is executed (optional). + */ + public function setUp() { + parent::setUp(); + } + + /** + * The tearDown() method is executed after the test was executed (optional) + * This can be used for cleanup. + */ + public function tearDown() { + parent::tearDown(); + } + + /** + * Simple example test case. + * + * Note how the function name begins with the word "test". + */ + public function testApiExample() { + $result = civicrm_api3('TwingleCampaign', 'Create', array('magicword' => 'sesame')); + $this->assertEquals('Twelve', $result['values'][12]['name']); + } + +} diff --git a/tests/phpunit/api/v3/TwingleCampaign/GetTest.php b/tests/phpunit/api/v3/TwingleCampaign/GetTest.php new file mode 100644 index 0000000..18a6fbf --- /dev/null +++ b/tests/phpunit/api/v3/TwingleCampaign/GetTest.php @@ -0,0 +1,53 @@ +installMe(__DIR__) + ->apply(); + } + + /** + * The setup() method is executed before the test is executed (optional). + */ + public function setUp() { + parent::setUp(); + } + + /** + * The tearDown() method is executed after the test was executed (optional) + * This can be used for cleanup. + */ + public function tearDown() { + parent::tearDown(); + } + + /** + * Simple example test case. + * + * Note how the function name begins with the word "test". + */ + public function testApiExample() { + $result = civicrm_api3('TwingleCampaign', 'Get', array('magicword' => 'sesame')); + $this->assertEquals('Twelve', $result['values'][12]['name']); + } + +} diff --git a/tests/phpunit/api/v3/TwingleCampaign/GetsingleTest.php b/tests/phpunit/api/v3/TwingleCampaign/GetsingleTest.php new file mode 100644 index 0000000..d97d092 --- /dev/null +++ b/tests/phpunit/api/v3/TwingleCampaign/GetsingleTest.php @@ -0,0 +1,53 @@ +installMe(__DIR__) + ->apply(); + } + + /** + * The setup() method is executed before the test is executed (optional). + */ + public function setUp() { + parent::setUp(); + } + + /** + * The tearDown() method is executed after the test was executed (optional) + * This can be used for cleanup. + */ + public function tearDown() { + parent::tearDown(); + } + + /** + * Simple example test case. + * + * Note how the function name begins with the word "test". + */ + public function testApiExample() { + $result = civicrm_api3('TwingleCampaign', 'Getsingle', array('magicword' => 'sesame')); + $this->assertEquals('Twelve', $result['values'][12]['name']); + } + +}