From: <gi...@ma...> - 2009-11-01 20:11:00
|
The branch, master-1.2.x has been updated via 63b6ba3da0a8da1769dcc8b9f369461367e86b55 (commit) from aa457a1a4c4a2f6f4da3962761ee3cc4749d6f90 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 63b6ba3da0a8da1769dcc8b9f369461367e86b55 Author: Robert Munteanu <rob...@gm...> Date: Sun Nov 1 22:09:23 2009 +0200 Test if the project documentation feature is enabled Since the project documentation is disabled by default, a check is made to see if it is enabled, otherwise the test is skipped. ----------------------------------------------------------------------- Summary of changes: tests/soap/AttachmentTest.php | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) ----------------------------------------------------------------------- commit 63b6ba3da0a8da1769dcc8b9f369461367e86b55 Author: Robert Munteanu <rob...@gm...> Date: Sun Nov 1 22:09:23 2009 +0200 Test if the project documentation feature is enabled Since the project documentation is disabled by default, a check is made to see if it is enabled, otherwise the test is skipped. diff --git a/tests/soap/AttachmentTest.php b/tests/soap/AttachmentTest.php index 2a7c2d6..823f771 100644 --- a/tests/soap/AttachmentTest.php +++ b/tests/soap/AttachmentTest.php @@ -103,6 +103,8 @@ class AttachmentTest extends SoapBase { * 5. Verify that the attachment contents is correct */ public function testProjectAttachmentIsAdded() { + $this->skipIfProjectDocumentationIsNotEnabled(); + $attachmentContents = 'Attachment contents.'; $attachmentId = $this->client->mc_project_attachment_add( @@ -133,6 +135,8 @@ class AttachmentTest extends SoapBase { */ public function testProjectAttachmentNotFound() { + $this->skipIfProjectDocumentationIsNotEnabled(); + try { $this->client->mc_project_attachment_get( $this->userName, @@ -143,6 +147,15 @@ class AttachmentTest extends SoapBase { $this->assertRegexp('/Unable to find an attachment/', $e->getMessage()); } } + + private function skipIfProjectDocumentationIsNotEnabled() { + + $configEnabled = $this->client->mc_config_get_string( $this->userName, $this->password, 'enable_project_documentation' ); + + if ( ! $configEnabled ) { + $this->markTestSkipped('Project documentation is not enabled.'); + } + } protected function tearDown() { SoapBase::tearDown(); ----------------------------------------------------------------------- -- Mantis Bug Tracker |