You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by ri...@apache.org on 2013/07/03 06:08:47 UTC

svn commit: r1499200 - /chemistry/phpclient/trunk/test/atom/AlfrescoH2CMISTest.php

Author: richardm
Date: Wed Jul  3 04:08:47 2013
New Revision: 1499200

URL: http://svn.apache.org/r1499200
Log:
Added tests

Modified:
    chemistry/phpclient/trunk/test/atom/AlfrescoH2CMISTest.php

Modified: chemistry/phpclient/trunk/test/atom/AlfrescoH2CMISTest.php
URL: http://svn.apache.org/viewvc/chemistry/phpclient/trunk/test/atom/AlfrescoH2CMISTest.php?rev=1499200&r1=1499199&r2=1499200&view=diff
==============================================================================
--- chemistry/phpclient/trunk/test/atom/AlfrescoH2CMISTest.php (original)
+++ chemistry/phpclient/trunk/test/atom/AlfrescoH2CMISTest.php Wed Jul  3 04:08:47 2013
@@ -1,4 +1,10 @@
 <?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 AlfrescoCMISH2Test extends PHPUnit_Framework_TestCase
@@ -10,10 +16,20 @@ class AlfrescoCMISH2Test extends PHPUnit
 		$repo_password = "admin";
 		$this->client = new CMISService($repo_url, $repo_username, $repo_password);
 	}
-	public function testGetSites() {
+	public function testGetFolder() {
+		/*
+		 * This test gets an known folder and tests the ability to retreive know properties
+		 */
 		$folder = $this->client->getObjectByPath("/Sites");
 		$this->assertEquals("F:st:sites",$folder->properties["cmis:objectTypeId"]);
 		$this->assertEquals("cmis:folder",$folder->properties["cmis:baseTypeId"]);
 	}
+	/**
+	 * @expectedException CmisObjectNotFoundException
+	 */
+	public function testInvalidCreateFolder() {
+		$folder = $this->client->getObjectByPath("/x");
+		$folder = $this->client->createFolder($folder->id,"TEST");
+	}
 }
 ?>