|
|
@@ -35,7 +35,7 @@ class RssViewTest extends CakeTestCase {
|
|
|
|
|
|
$this->Rss = new RssView();
|
|
|
|
|
|
- $this->baseUrl = $this->baseUrl = php_sapi_name() == 'cli' ? 'http://localhost' : HTTP_BASE;
|
|
|
+ $this->baseUrl = php_sapi_name() === 'cli' ? 'http://localhost' : HTTP_BASE;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -160,6 +160,30 @@ RSS;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * RssViewTest::testSerializeWithUnconfiguredPrefix()
|
|
|
+ *
|
|
|
+ * @expectedException RuntimeException
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function testSerializeWithUnconfiguredPrefix() {
|
|
|
+ $Request = new CakeRequest();
|
|
|
+ $Response = new CakeResponse();
|
|
|
+ $Controller = new Controller($Request, $Response);
|
|
|
+
|
|
|
+ $data = array(
|
|
|
+ 'channel' => array(
|
|
|
+ 'foo:bar' => 'something',
|
|
|
+ ),
|
|
|
+ 'items' => array(
|
|
|
+ array('title' => 'Title Two'),
|
|
|
+ )
|
|
|
+ );
|
|
|
+ $Controller->set(array('channel' => $data, '_serialize' => 'channel'));
|
|
|
+ $View = new RssView($Controller);
|
|
|
+ $result = $View->render(false);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* RssViewTest::testSerializeWithArrayLinks()
|
|
|
*
|
|
|
* `'atom:link' => array('@href' => array(...)` becomes
|