18 public function setUp()
20 $this->api = $this->getMock(
'RepositoryApi',array(
'getCmsObject',
'getContentAttributes',
'getBinaryContent',
'getLastModificationTime'));
23 public function testGetCMSobject()
26 ->expects($this->once())
27 ->method(
'getCmsObject')
28 ->will($this->returnValue(array()));
29 $cmsObject = $this->api->getCMSobject(
'/page');
30 $this->assertTrue(is_array($cmsObject));
33 public function testGetContentAttributes()
36 ->expects($this->once())
37 ->method(
'getContentAttributes')
38 ->will($this->returnValue(array()));
39 $cmsObject = $this->api->getContentAttributes(
'/page', array());
40 $this->assertTrue(is_array($cmsObject));
43 public function testGetBinaryContent()
46 ->expects($this->once())
47 ->method(
'getBinaryContent')
48 ->will($this->returnValue(array()));
49 $cmsObject = $this->api->getBinaryContent(
'/page');
50 $this->assertTrue(is_array($cmsObject));
53 public function testGetLastModificationTime()
56 ->expects($this->once())
57 ->method(
'getLastModificationTime')
58 ->will($this->returnValue(65125121312));
59 $cmsObject = $this->api->getLastModificationTime(
'/page');
60 $this->assertEquals(65125121312,$cmsObject);