chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From richa...@apache.org
Subject svn commit: r1499220 - in /chemistry/phpclient/trunk: atom/cmis/cmis_service.php test/atom/AlfrescoH2CMISTest.php test/atom/NotImplementedTest.php
Date Wed, 03 Jul 2013 06:03:30 GMT
Author: richardm
Date: Wed Jul  3 06:03:30 2013
New Revision: 1499220

URL: http://svn.apache.org/r1499220
Log:
Update TEsts fix problem with CMisNotIMplemented exceptions



Added:
    chemistry/phpclient/trunk/test/atom/NotImplementedTest.php
Modified:
    chemistry/phpclient/trunk/atom/cmis/cmis_service.php
    chemistry/phpclient/trunk/test/atom/AlfrescoH2CMISTest.php

Modified: chemistry/phpclient/trunk/atom/cmis/cmis_service.php
URL: http://svn.apache.org/viewvc/chemistry/phpclient/trunk/atom/cmis/cmis_service.php?rev=1499220&r1=1499219&r2=1499220&view=diff
==============================================================================
--- chemistry/phpclient/trunk/atom/cmis/cmis_service.php (original)
+++ chemistry/phpclient/trunk/atom/cmis/cmis_service.php Wed Jul  3 06:03:30 2013
@@ -263,7 +263,7 @@ class CMISService extends CMISRepository
 	 * @since CMIS-1.0
 	 */
 	function getRepositories() {
-		throw CmisNotImplementedException("getRepositories");
+		throw new CmisNotImplementedException("getRepositories");
 	}
 
 	/**
@@ -375,7 +375,7 @@ class CMISService extends CMISRepository
 	 * @since CMIS-1.1
 	 */
 	function createType($objectType) {
-		throw CmisNotImplementedException("createType");		
+		throw new CmisNotImplementedException("createType");		
 	}
 
 	/**
@@ -390,7 +390,7 @@ class CMISService extends CMISRepository
 	 * @since CMIS-1.1
 	 */
 	function updateType($objectType) {
-		throw CmisNotImplementedException("updateType");		
+		throw new CmisNotImplementedException("updateType");		
 	}
 
 	/**
@@ -403,7 +403,7 @@ class CMISService extends CMISRepository
 	 * @since CMIS-1.1
 	 */
 	function deleteType($typeId) {
-		throw CmisNotImplementedException("deleteType");		
+		throw new CmisNotImplementedException("deleteType");		
 	}
 	//Navigation Services
 	/**
@@ -962,15 +962,15 @@ xmlns:cmisra="http://docs.oasis-open.org
 	}
 
 	function createRelationship() { // Not in first Release
-		throw CmisNotImplementedException("createRelationship");
+		throw new CmisNotImplementedException("createRelationship");
 	}
 
 	function createPolicy() { // Not in first Release
-		throw CmisNotImplementedException("createPolicy");
+		throw new CmisNotImplementedException("createPolicy");
 	}
 	
 	function createItem() {
-		throw CmisNotImplementedException("createItem");
+		throw new CmisNotImplementedException("createItem");
 	}
 
 	function updateProperties($objectId, $properties = array (), $options = array ()) { // Yes
@@ -1017,7 +1017,7 @@ xmlns:cmisra="http://docs.oasis-open.org
 	
 	// New for 1.1
 	function bulkUpdateProperties() {
-		throw CmisNotImplementedException("bulkUpdateProperties");		
+		throw new CmisNotImplementedException("bulkUpdateProperties");		
 	}
 
 	function moveObject($objectId, $targetFolderId, $sourceFolderId, $options = array ()) {
//yes
@@ -1088,7 +1088,7 @@ xmlns:cmisra="http://docs.oasis-open.org
 	 * @since CMIS-1.0
 	 */
 	function appendContentStream($objectId, $content, $content_type, $options = array ()) {
//Yes
-		throw CmisNotImplementedException("appendContentStream");
+		throw new CmisNotImplementedException("appendContentStream");
 	}
 
 	/**
@@ -1120,7 +1120,7 @@ xmlns:cmisra="http://docs.oasis-open.org
 	}
 
 	function getAllVersions() {
-		throw CmisNotImplementedException("getAllVersions");
+		throw new CmisNotImplementedException("getAllVersions");
 	}
 
 	/**
@@ -1179,14 +1179,14 @@ xmlns:cmisra="http://docs.oasis-open.org
 	}
 
 	function deleteAllVersions() {
-		throw CmisNotImplementedException("deleteAllVersions");
+		throw new CmisNotImplementedException("deleteAllVersions");
 	}
 
 	//Relationship Services
 	function getObjectRelationships() {
 		// get stripped down version of object (for the links) and then get the relationships?
 		// Low priority -- can get all information when getting object
-		throw CmisNotImplementedException("getObjectRelationships");
+		throw new CmisNotImplementedException("getObjectRelationships");
 	}
 
 	//Multi-Filing ServicesRelation
@@ -1208,23 +1208,23 @@ xmlns:cmisra="http://docs.oasis-open.org
 
 	//Policy Services
 	function getAppliedPolicies() {
-		throw CmisNotImplementedException("getAppliedPolicies");
+		throw new CmisNotImplementedException("getAppliedPolicies");
 	}
 
 	function applyPolicy() {
-		throw CmisNotImplementedException("applyPolicy");
+		throw new CmisNotImplementedException("applyPolicy");
 	}
 
 	function removePolicy() {
-		throw CmisNotImplementedException("removePolicy");
+		throw new CmisNotImplementedException("removePolicy");
 	}
 
 	//ACL Services
 	function getACL() {
-		throw CmisNotImplementedException("getACL");
+		throw new CmisNotImplementedException("getACL");
 	}
 
 	function applyACL() {
-		throw CmisNotImplementedException("applyACL");
+		throw new CmisNotImplementedException("applyACL");
 	}
 }
\ No newline at end of file

Modified: chemistry/phpclient/trunk/test/atom/AlfrescoH2CMISTest.php
URL: http://svn.apache.org/viewvc/chemistry/phpclient/trunk/test/atom/AlfrescoH2CMISTest.php?rev=1499220&r1=1499219&r2=1499220&view=diff
==============================================================================
--- chemistry/phpclient/trunk/test/atom/AlfrescoH2CMISTest.php (original)
+++ chemistry/phpclient/trunk/test/atom/AlfrescoH2CMISTest.php Wed Jul  3 06:03:30 2013
@@ -31,5 +31,4 @@ class AlfrescoCMISH2Test extends PHPUnit
 		$folder = $this->client->getObjectByPath("/x");
 		$folder = $this->client->createFolder($folder->id,"TEST");
 	}
-}
-?>
+}
\ No newline at end of file

Added: chemistry/phpclient/trunk/test/atom/NotImplementedTest.php
URL: http://svn.apache.org/viewvc/chemistry/phpclient/trunk/test/atom/NotImplementedTest.php?rev=1499220&view=auto
==============================================================================
--- chemistry/phpclient/trunk/test/atom/NotImplementedTest.php (added)
+++ chemistry/phpclient/trunk/test/atom/NotImplementedTest.php Wed Jul  3 06:03:30 2013
@@ -0,0 +1,146 @@
+<?php
+/*
+
+This set of tests are designed to run against an clean (new) Alfresco repository
+The easiest way to run this would be to have a repository that uses an H2 database (for easy
reseting)
+
+*/
+require_once('../utils/phpunit.phar');
+require_once('../../atom/cmis-lib.php');
+class NotImplementedTest extends PHPUnit_Framework_TestCase
+{
+	protected $client;
+	protected function setUp() {
+		$repo_url = "http://localhost:8080/alfresco/cmisatom";
+		$repo_username = "admin";
+		$repo_password = "admin";
+		$this->client = new CMISService($repo_url, $repo_username, $repo_password);
+	}
+	/**
+	 * @expectedException CmisNotImplementedException
+	 * @expectedExceptionMessage getRepositories
+	 */
+	public function testGetRepositories() {
+		$this->client->getRepositories();
+	}
+	
+	/**
+	 * @expectedException CmisNotImplementedException
+	 * @expectedExceptionMessage createType
+	 */
+	public function testCreateType() {
+		$this->client->createType("");
+	}
+
+	/**
+	 * @expectedException CmisNotImplementedException
+	 * @expectedExceptionMessage updateType
+	 */
+	public function testUpdateType() {
+		$this->client->updateType("");
+	}
+	/**
+	 * @expectedException CmisNotImplementedException
+	 * @expectedExceptionMessage deleteType
+	 */
+	public function testDeleteType() {
+		$this->client->deleteType("");
+	}
+	/**
+	 * @expectedException CmisNotImplementedException
+	 * @expectedExceptionMessage createRelationship
+	 */
+	public function testCreateRelationship() {
+		$this->client->createRelationship();
+	}
+
+	/**
+	 * @expectedException CmisNotImplementedException
+	 * @expectedExceptionMessage createPolicy
+	 */
+	public function testCreatePolicy() {
+		$this->client->createPolicy();
+	}
+	/**
+	 * @expectedException CmisNotImplementedException
+	 * @expectedExceptionMessage createItem
+	 */
+	public function testCreateItem() {
+		$this->client->createItem();
+	}
+	/**
+	 * @expectedException CmisNotImplementedException
+	 * @expectedExceptionMessage bulkUpdateProperties
+	 */
+	public function testBulkUpdateProperties() {
+		$this->client->bulkUpdateProperties();
+	}
+	
+	/**
+	 * @expectedException CmisNotImplementedException
+	 * @expectedExceptionMessage appendContentStream
+	 */
+	public function testAppendContentStream() {
+		$this->client->appendContentStream("","","","");
+	}
+
+	/**
+	 * @expectedException CmisNotImplementedException
+	 * @expectedExceptionMessage getAllVersions
+	 */
+	public function testGetAllVersions() {
+		$this->client->getAllVersions("");
+	}
+	/**
+	 * @expectedException CmisNotImplementedException
+	 * @expectedExceptionMessage deleteAllVersions
+	 */
+	public function testDeleteAllVersions() {
+		$this->client->deleteAllVersions("");
+	}
+	/**
+	 * @expectedException CmisNotImplementedException
+	 * @expectedExceptionMessage getObjectRelationships
+	 */
+	public function testGetObjectRelationships() {
+		$this->client->getObjectRelationships();
+	}
+
+	/**
+	 * @expectedException CmisNotImplementedException
+	 * @expectedExceptionMessage getAppliedPolicies
+	 */
+	public function testGetAppliedPolicies() {
+		$this->client->getAppliedPolicies();
+	}
+	/**
+	 * @expectedException CmisNotImplementedException
+	 * @expectedExceptionMessage applyPolicy
+	 */
+	public function testApplyPolicy() {
+		$this->client->applyPolicy();
+	}
+	/**
+	 * @expectedException CmisNotImplementedException
+	 * @expectedExceptionMessage removePolicy
+	 */
+	public function testRemovePolicy() {
+		$this->client->removePolicy();
+	}
+
+	/**
+	 * @expectedException CmisNotImplementedException
+	 * @expectedExceptionMessage getACL
+	 */
+	public function testGetACL() {
+		$this->client->getACL();
+	}
+	/**
+	 * @expectedException CmisNotImplementedException
+	 * @expectedExceptionMessage applyACL
+	 */
+	public function testApplyACL() {
+		$this->client->applyACL();
+	}
+
+}
\ No newline at end of file



Mime
View raw message